mirror of
https://github.com/cmur2/joe-syntax.git
synced 2024-12-21 16:54:23 +01:00
Updated HowItWorks
This commit is contained in:
parent
26bf96cc4c
commit
81411e1446
@ -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
5
md.jsf
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user