Last change
on this file since 065de93 was
fda8168,
checked in by Peter A. Buhr <pabuhr@…>, 7 years ago
|
format tool for pretty printing grammar
|
-
Property mode set to
100644
|
File size:
380 bytes
|
Rev | Line | |
---|
[fda8168] | 1 | %token A |
---|
| 2 | |
---|
| 3 | %start rules |
---|
| 4 | %% |
---|
| 5 | rules : /* empty */ /* no rules */ |
---|
| 6 | | lhs rhs /* start new rule */ |
---|
| 7 | | lhs rhs ';' /* start new rule */ |
---|
| 8 | | |
---|
| 9 | ; |
---|
| 10 | |
---|
| 11 | lhs : A | ':' ; |
---|
| 12 | |
---|
| 13 | rhs : /* empty */ /* empty rule */ |
---|
| 14 | | rhs more ; |
---|
| 15 | |
---|
| 16 | more : lhs /* start next rule */ |
---|
| 17 | | ';' lhs /* start next rule */ |
---|
| 18 | | foo /* component of current rule */ |
---|
| 19 | | '|' /* empty rule */ |
---|
| 20 | ; |
---|
| 21 | |
---|
| 22 | foo : A | 'l' | 'X' |
---|
| 23 | |
---|
| 24 | bar: |
---|
Note: See
TracBrowser
for help on using the repository browser.