simple.cc - generated code example
[prop.git] / tools / test / g1.pcc
blobb2409a1a8ce12c0414840a90cb9733f7001ede31
1 //
2 // Sample grammar that is LR(1) but not LALR(1)
3 // 
5 datatype T :: lexeme = Id;
7 syntax class Testing {};
9 syntax Testing
11    S    : '(' Exp1 ')'  // Should have 2 reduce/reduce conflicts here.
12         | '[' Exp1 ']' 
13         | '(' Exp2 ']' 
14         | '[' Exp2 ')' 
15         | '[' Exp2 '>'
16         ;
17    Exp1 : Id ;
18    Exp2 : Id ;