aboutsummaryrefslogtreecommitdiff
path: root/runtime/JavaScript/tests/functional/t039labels.g
blob: ed608841823f0e37a83d401ecb5b983e818cd865 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
grammar t039labels;
options {
  language = JavaScript;
}

a returns [l]
    : ids+=A ( ',' ids+=(A|B) )* C D w=. ids+=. F EOF
        { l = [$ids, $w]; }
    ;

A: 'a'..'z';
B: '0'..'9';
C: a='A';
D: a='FOOBAR';
E: 'GNU' a=.;
F: 'BLARZ' a=EOF;

WS: ' '+  { $channel = HIDDEN };