You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
325 B

grammar t039labels;
options {
language = Python;
}
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' { print $a };
D: a='FOOBAR' { print $a };
E: 'GNU' a=. { print $a };
F: 'BLARZ' a=EOF { print $a };
WS: ' '+ { $channel = HIDDEN };