source: tools/prettyprinter/test1.y @ fda8168

aaron-thesisarm-ehcleanup-dtorsdeferred_resndemanglerjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerresolv-newwith_gc
Last change on this file since fda8168 was fda8168, checked in by Peter A. Buhr <pabuhr@…>, 4 years ago

format tool for pretty printing grammar

  • Property mode set to 100644
File size: 380 bytes
Line 
1%token A
2
3%start rules
4%%
5rules   : /* empty */           /* no rules */
6        | lhs rhs               /* start new rule */
7        | lhs rhs ';'           /* start new rule */
8        |
9        ;
10
11lhs     : A | ':' ;
12
13rhs     : /* empty */           /* empty rule */
14        | rhs more ;
15
16more    : lhs                   /* start next rule */
17        | ';' lhs               /* start next rule */
18        | foo                   /* component of current rule */
19        | '|'                   /* empty rule */
20        ;
21
22foo     : A | 'l' | 'X'
23
24bar:
Note: See TracBrowser for help on using the repository browser.