added readme
This commit is contained in:
26
README.md
Normal file
26
README.md
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
## Grammar Syntax
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
$FOO -> /foo
|
||||||
|
$FOO -> /foo$FOO
|
||||||
|
$FOO -> $BAR
|
||||||
|
$BAR -> /bar
|
||||||
|
$BAR -> $BAR
|
||||||
|
|
||||||
|
|
||||||
|
### Nonterminals
|
||||||
|
|
||||||
|
A Nonterminal starts with a leading `$`. The nonterminal `FOO` would be written as:
|
||||||
|
|
||||||
|
$FOO
|
||||||
|
|
||||||
|
|
||||||
|
### Terminals
|
||||||
|
|
||||||
|
A Terminals starts with a leading `/`. The terminal `bar` would be written as:
|
||||||
|
|
||||||
|
/bar
|
||||||
|
|
||||||
|
Note that `/ab` differs from `/a/b`. The string `/ab` resolves to the terminal `ab`,
|
||||||
|
whereas `/a/b` resolves to the terminals `a` and `b`
|
Reference in New Issue
Block a user