aboutsummaryrefslogtreecommitdiff
path: root/runtime/Python/tests/t044trace.g
blob: 0b7aa71b24efe2d0dac567006736b4d58382cea1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
grammar t044trace;
options {
  language = Python;
}

@init {
    self._stack = None
}

a: '<' ((INT '+')=>b|c) '>';
b: c ('+' c)*;
c: INT 
    {
        if self._stack is None:
            self._stack = self.getRuleInvocationStack()
    }
    ;

INT: ('0'..'9')+;
WS: (' ' | '\n' | '\t')+ {$channel = HIDDEN;};