1grammar t045dfabug;
2options {
3    language =Cpp;
4    output = AST;
5}
6
7@lexer::includes
8{
9#include "UserTestTraits.hpp"
10}
11@lexer::namespace
12{ Antlr3Test }
13
14@parser::includes {
15#include "UserTestTraits.hpp"
16}
17@parser::namespace
18{ Antlr3Test }
19
20// this rule used to generate an infinite loop in DFA.predict
21r
22options { backtrack=true; }
23    : (modifier+ INT)=> modifier+ expression
24    | modifier+ statement
25    ;
26
27expression
28    : INT '+' INT
29    ;
30
31statement
32    : 'fooze'
33    | 'fooze2'
34    ;
35
36modifier
37    : 'public'
38    | 'private'
39    ;
40
41ID : 'a'..'z' + ;
42INT : '0'..'9' +;
43WS: (' ' | '\n' | '\t')+ {$channel = HIDDEN;};
44
45