File: t044trace.g

package info (click to toggle)
python3-antlr3 3.5.2-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,580 kB
  • sloc: python: 14,246; makefile: 32; sh: 13
file content (20 lines) | stat: -rw-r--r-- 312 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
grammar t044trace;
options {
  language = Python3;
}

@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;};