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.
13 lines
322 B
13 lines
322 B
grammar t057autoAST36;
|
|
options {language=JavaScript;output=AST;}
|
|
a returns [result] : ids+=ID ids+=ID {
|
|
var p, buffer=[];
|
|
for (p=0; p<$ids.length; p++) {
|
|
buffer.push($ids[p]);
|
|
}
|
|
$result = "id list=["+buffer.join(",")+"],";
|
|
} ;
|
|
ID : 'a'..'z'+ ;
|
|
INT : '0'..'9'+;
|
|
WS : (' '|'\n') {$channel=HIDDEN;} ;
|