• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1grammar t023scopes;
2
3options {
4    language=Cpp;
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
20prog
21scope {
22name
23}
24    :   ID {$prog::name=$ID.text;}
25    ;
26
27ID  :   ('a'..'z')+
28    ;
29
30WS  :   (' '|'\n'|'\r')+ {$channel=HIDDEN}
31    ;
32