Updated HowItWorks

This commit is contained in:
Christian Nicolai 2011-08-01 19:01:46 +02:00
parent 26bf96cc4c
commit 81411e1446
2 changed files with 10 additions and 5 deletions

View File

@ -6,15 +6,19 @@ A (deterministic) state machine which performs lexical analysis of C.
program could be used to convert a regular expression NFA syntax into this program could be used to convert a regular expression NFA syntax into this
format). format).
Each state begins with Each state begins with:
':<name> <color-name>'
:<name> <color-name>
\<color-name\> is the color used for characters eaten by the state \<color-name\> is the color used for characters eaten by the state
(really a symbol for a user definable color). (really a symbol for a user definable color).
The first state defined is the initial state. The first state defined is the initial state.
Within a state, define transitions (jumps) to other states. Each Within a state, define transitions (jumps) to other states. Each
jump has the form: <character-list> <target-state> [<option>s] jump has the form:
<character-list> <target-state> [<option>s]
There are three ways to specify <character-list>s, either * for any There are three ways to specify <character-list>s, either * for any
character not otherwise specified, & to match the character in the character not otherwise specified, & to match the character in the

5
md.jsf
View File

@ -5,15 +5,16 @@
# bold parsing is not that perfect since this works: **bold__ # bold parsing is not that perfect since this works: **bold__
=Idle =Idle
=Escape bold
=Bold bold =Bold bold
:idle Idle :idle Idle
* idle * idle
"\\" slash "\\" slash recolor=-1
"*_" maybe_bold1 "*_" maybe_bold1
# do escaping of *_ # do escaping of *_
:slash Idle :slash Escape
* idle * idle
"*_" idle "*_" idle