
org.antlr.v4.test.runtime.templates.ParserExec.TokenOffset.stg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of runtime-testsuite Show documentation
Show all versions of runtime-testsuite Show documentation
A collection of tests for ANTLR 4 Runtime libraries.
The newest version!
/**
* This is a regression test for antlr/antlr4#2728
* It should generate correct code for grammars with more than 65 tokens.
* https://github.com/antlr/antlr4/pull/2728#issuecomment-622940562
*/
TestType() ::= "Parser"
Options ::= [
"Debug": false
]
Grammar ::= [
"L": {}
]
Input() ::= "12 34 56 66"
Rule() ::= "a"
Output() ::= "12345666<\n>"
Errors() ::= ""
grammar(grammarName) ::= <<
grammar ;
a : ('1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'|'10'|'11'|'12'|'13'|'14'|'15'|'16'
|'17'|'18'|'19'|'20'|'21'|'22'|'23'|'24'|'25'|'26'|'27'|'28'|'29'|'30'|'31'|'32'
|'33'|'34'|'35'|'36'|'37'|'38'|'39'|'40'|'41'|'42'|'43'|'44'|'45'|'46'|'47'|'48'
|'49'|'50'|'51'|'52'|'53'|'54'|'55'|'56'|'57'|'58'|'59'|'60'|'61'|'62'|'63'|'64'
|'65'|'66')+ {
};
WS : (' '|'\n') -> skip;
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy