source: tools/prettyprinter/test.y@ 4a60488

ADT arm-eh ast-experimental enum forall-pointer-decay jacob/cs343-translation new-ast new-ast-unique-expr pthread-emulation qualifiedEnum
Last change on this file since 4a60488 was 81bb114, checked in by Peter A. Buhr <pabuhr@…>, 7 years ago

update to support more bison directives

  • Property mode set to 100644
File size: 626 bytes
Line 
1/* adasd1 */
2
3%token<tokenp> A 1 , B 2 C 3 // %%
4%type<tokenp> A , B C // %%
5%type A , B C // %%
6
7/* adsad2 */
8%locations
9%define parse.error verbose
10%%
11
12rules2 : pop xxx %prec '.' yyy push %prec '.' /* XX */
13 { $$ = build_nt (CALL_EXPR, $1, $2, NULL_TREE); }
14 { $$ = build_nt (CALL_EXPR, $1, $2, NULL_TREE); }
15 | xxx yyy ';'
16 ;
17
18rules1 :
19 /* empty */
20 {}
21 | xxx
22 /* fred */ yyy
23 | xxx
24 {}
25 yyy ';'
26 |
27 ;
28
29mark : MARK
30 | error /* missing %% */
31 {
32 cerr << "no input grammar, missing %% mark" << endl;
33 exit( -1 );
34 }
35 ;
36
37x : xxx yyy
38
39y :
40 ;
41
42w :
43 xxx
44 |
45 yyy
46 ;
47%%
48{
49 {
50 }
51}
Note: See TracBrowser for help on using the repository browser.