Home | History | Annotate | Download | only in tests
      1 grammar t044trace;
      2 options {
      3   language = Python;
      4 }
      5 
      6 @init {
      7     self._stack = None
      8 }
      9 
     10 a: '<' ((INT '+')=>b|c) '>';
     11 b: c ('+' c)*;
     12 c: INT 
     13     {
     14         if self._stack is None:
     15             self._stack = self.getRuleInvocationStack()
     16     }
     17     ;
     18 
     19 INT: ('0'..'9')+;
     20 WS: (' ' | '\n' | '\t')+ {$channel = HIDDEN;};
     21