1grammar t044trace; 2options { 3 language =Cpp; 4} 5 6@lexer::includes 7{ 8#include "UserTestTraits.hpp" 9} 10@lexer::namespace 11{ Antlr3Test } 12 13@parser::includes { 14#include "UserTestTraits.hpp" 15} 16@parser::namespace 17{ Antlr3Test } 18 19@init { 20 self._stack = None 21} 22 23a: '<' ((INT '+')=>b|c) '>'; 24b: c ('+' c)*; 25c: INT 26 { 27 if self._stack is None: 28 self._stack = self.getRuleInvocationStack() 29 } 30 ; 31 32INT: ('0'..'9')+; 33WS: (' ' | '\n' | '\t')+ {$channel = HIDDEN;}; 34