Commit 8b2fc1b79de00d395f68852741260e8ec46528b9
1 parent
eae54a82
Revert "-"
This reverts commit e839ef4cf2f715894c6cbfbbc5aa38e7932ac751.
Showing
2 changed files
with
18 additions
and
18 deletions
Show diff stats
anubis_dev/library/doc_tools/maml3_tutorial.maml
| ... | ... | @@ -125,11 +125,11 @@ $list( |
| 125 | 125 | $item when done, create the $italic(colorizer). |
| 126 | 126 | ) |
| 127 | 127 | A color rule has the form: |
| 128 | -$center($tt($$colorrule(<colorizer name>)(<regular expression>)(<MAML expression containing $$1>))) | |
| 129 | -$par | |
| 128 | +$center($tt($$colorrule(<colorizer name>)(<regular expression>)(r,g,b))) | |
| 129 | +where $tt(r), $tt(g) and $tt(b) are integers between 0 and 255.$par$par | |
| 130 | + | |
| 130 | 131 | The name of the colorizer must be an ordinary symbol. Regular expressions must follow the syntax defined in |
| 131 | -$bold($tt(library/lexical_analysis/fast_lexer_5.anubis)). The $MAML expression can contain the $MAML variable | |
| 132 | -$tt($$1) which will be replaced by the token read.$par$par | |
| 132 | +$bold($tt(library/lexical_analysis/fast_lexer_5.anubis)).$par$par | |
| 133 | 133 | |
| 134 | 134 | Once the color rules are setup, you can ceate the colorizer as follows:$par |
| 135 | 135 | $center($tt($$colorizer(<colorizer name>))) |
| ... | ... | @@ -138,14 +138,14 @@ $center($tt($$colorize(<colorizer name>)(<text>))) |
| 138 | 138 | |
| 139 | 139 | As an example, consider the following definition of a colorizer: |
| 140 | 140 | $code(255,255,255)( |
| 141 | -$$colorrule(mycolorizer)([0-9]+)($$rgb(120,0,0)($$1)) | |
| 142 | -$$colorrule(mycolorizer)([a-z]+)($$rgb(0,120,0)($$1)) | |
| 143 | -$$colorrule(mycolorizer)([A-Z][a-z]+)($$bold($$rgb(0,0,120)($$1))) | |
| 141 | +$$colorrule(mycolorizer)([0-9]+)(120,0,0) | |
| 142 | +$$colorrule(mycolorizer)([a-z]+)(0,120,0) | |
| 143 | +$$colorrule(mycolorizer)([A-Z][a-z]+)(0,0,120) | |
| 144 | 144 | $$colorizer(mycolorizer) |
| 145 | 145 | ) |
| 146 | -$colorrule(mycolorizer)([0-9]+)($rgb(120,0,0)($1)) | |
| 147 | -$colorrule(mycolorizer)([a-z]+)($rgb(0,120,0)($1)) | |
| 148 | -$colorrule(mycolorizer)([A-Z][a-z]+)($bold($rgb(0,0,120)($1))) | |
| 146 | +$colorrule(mycolorizer)([0-9]+)(120,0,0) | |
| 147 | +$colorrule(mycolorizer)([a-z]+)(0,120,0) | |
| 148 | +$colorrule(mycolorizer)([A-Z][a-z]+)(0,0,120) | |
| 149 | 149 | $colorizer(mycolorizer) |
| 150 | 150 | If you write this:$par |
| 151 | 151 | $center($tt($$colorize(mycolorizer)(There are more than 4543225 stars in the sky.))) | ... | ... |
anubis_dev/library/doc_tools/maml3_tutorial.maml.html
| ... | ... | @@ -189,11 +189,11 @@ In order to create a colorizer, you must: |
| 189 | 189 | <li> when done, create the <em>colorizer</em>. |
| 190 | 190 | </ul></span> |
| 191 | 191 | A color rule has the form: |
| 192 | -<br><center><table style="color: inherit; font-size: inherit;"><tr><td><span style="font-family:'Lucida Console', monospace; font-size:inherit; font-style: normal;">$colorrule(<colorizer name>)(<regular expression>)(<MAML expression containing $1>)</span></td></tr></table></center><br> | |
| 193 | -<br> | |
| 192 | +<br><center><table style="color: inherit; font-size: inherit;"><tr><td><span style="font-family:'Lucida Console', monospace; font-size:inherit; font-style: normal;">$colorrule(<colorizer name>)(<regular expression>)(r,g,b)</span></td></tr></table></center><br> | |
| 193 | +where <span style="font-family:'Lucida Console', monospace; font-size:inherit; font-style: normal;">r</span>, <span style="font-family:'Lucida Console', monospace; font-size:inherit; font-style: normal;">g</span> and <span style="font-family:'Lucida Console', monospace; font-size:inherit; font-style: normal;">b</span> are integers between 0 and 255.<br><br> | |
| 194 | + | |
| 194 | 195 | The name of the colorizer must be an ordinary symbol. Regular expressions must follow the syntax defined in |
| 195 | -<strong><span style="font-family:'Lucida Console', monospace; font-size:inherit; font-style: normal;">library/lexical_analysis/fast_lexer_5.anubis</span></strong>. The <strong><div style="display: inline; color: rgb(220,0,0)">MAML</div></strong> expression can contain the <strong><div style="display: inline; color: rgb(220,0,0)">MAML</div></strong> variable | |
| 196 | -<span style="font-family:'Lucida Console', monospace; font-size:inherit; font-style: normal;">$1</span> which will be replaced by the token read.<br><br> | |
| 196 | +<strong><span style="font-family:'Lucida Console', monospace; font-size:inherit; font-style: normal;">library/lexical_analysis/fast_lexer_5.anubis</span></strong>.<br><br> | |
| 197 | 197 | |
| 198 | 198 | Once the color rules are setup, you can ceate the colorizer as follows:<br> |
| 199 | 199 | <br><center><table style="color: inherit; font-size: inherit;"><tr><td><span style="font-family:'Lucida Console', monospace; font-size:inherit; font-style: normal;">$colorizer(<colorizer name>)</span></td></tr></table></center><br> |
| ... | ... | @@ -202,9 +202,9 @@ Then you can colorize a text as follows:<br> |
| 202 | 202 | |
| 203 | 203 | As an example, consider the following definition of a colorizer: |
| 204 | 204 | <pre style="color: inherit; font-size: inherit; background-color: rgb(255,255,255); width: 600px;"> |
| 205 | -$colorrule(mycolorizer)([0-9]+)($rgb(120,0,0)($1)) | |
| 206 | -$colorrule(mycolorizer)([a-z]+)($rgb(0,120,0)($1)) | |
| 207 | -$colorrule(mycolorizer)([A-Z][a-z]+)($bold($rgb(0,0,120)($1))) | |
| 205 | +$colorrule(mycolorizer)([0-9]+)(120,0,0) | |
| 206 | +$colorrule(mycolorizer)([a-z]+)(0,120,0) | |
| 207 | +$colorrule(mycolorizer)([A-Z][a-z]+)(0,0,120) | |
| 208 | 208 | $colorizer(mycolorizer) |
| 209 | 209 | </pre> |
| 210 | 210 | |
| ... | ... | @@ -214,7 +214,7 @@ $colorizer(mycolorizer) |
| 214 | 214 | If you write this:<br> |
| 215 | 215 | <br><center><table style="color: inherit; font-size: inherit;"><tr><td><span style="font-family:'Lucida Console', monospace; font-size:inherit; font-style: normal;">$colorize(mycolorizer)(There are more than 4543225 stars in the sky.)</span></td></tr></table></center><br> |
| 216 | 216 | You get this:<br> |
| 217 | -<br><center><table style="color: inherit; font-size: inherit;"><tr><td><strong><div style="display: inline; color: rgb(0,0,120)">There</div></strong> <div style="display: inline; color: rgb(0,120,0)">are</div> <div style="display: inline; color: rgb(0,120,0)">more</div> <div style="display: inline; color: rgb(0,120,0)">than</div> <div style="display: inline; color: rgb(120,0,0)">4543225</div> <div style="display: inline; color: rgb(0,120,0)">stars</div> <div style="display: inline; color: rgb(0,120,0)">in</div> <div style="display: inline; color: rgb(0,120,0)">the</div> <div style="display: inline; color: rgb(0,120,0)">sky</div>.</td></tr></table></center><br> | |
| 217 | +<br><center><table style="color: inherit; font-size: inherit;"><tr><td><div style="display: inline; color: rgb(0,0,120)">There</div> <div style="display: inline; color: rgb(0,120,0)">are</div> <div style="display: inline; color: rgb(0,120,0)">more</div> <div style="display: inline; color: rgb(0,120,0)">than</div> <div style="display: inline; color: rgb(120,0,0)">4543225</div> <div style="display: inline; color: rgb(0,120,0)">stars</div> <div style="display: inline; color: rgb(0,120,0)">in</div> <div style="display: inline; color: rgb(0,120,0)">the</div> <div style="display: inline; color: rgb(0,120,0)">sky</div>.</td></tr></table></center><br> | |
| 218 | 218 | |
| 219 | 219 | <a id=toclab4></a><h2>The catalog of <strong><div style="display: inline; color: rgb(220,0,0)">MAML</div></strong> marks</h2> |
| 220 | 220 | Below are the <strong><div style="display: inline; color: rgb(220,0,0)">MAML</div></strong> marks in alphabetic order: | ... | ... |