Tom 0e1165f9ee | 6 years ago | |
---|---|---|
lab | 6 years ago | |
src | 6 years ago | |
.gitignore | 6 years ago | |
README.md | 6 years ago |
$FOO -> /foo
$FOO -> /foo$FOO
$FOO -> $BAR
$BAR -> /bar
$BAR -> $BAR
A Nonterminal starts with a leading $
. The nonterminal FOO
would be written as:
$FOO
A Terminal 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
/~
resolves to the Empty String
The ->
indicates a production, the Nonterminal on it's left side gets replaced
by the string of Nonterminals and Terminals on it's right side.
$FOO -> /foo$FOO