
org.antlr.v4.test.runtime.templates.BaseContext.LeftRecursive.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!
TestType() ::= "Parser"
Options ::= [
"Debug": false
]
Grammar ::= [
"T": {}
]
Input() ::= "3 a"
Rule() ::= "input"
Output() ::= ""
Errors() ::= ""
grammar(grammarName) ::= <<
grammar ;
input
: e1=expression e2=expressionNoNumber EOF
;
expression
: ID
| NUMBER
| expression '+' expression
;
expressionNoNumber
options { baseContext = expression; }
: ID
| expressionNoNumber '+' expressionNoNumber
;
ID : 'a'..'z'+;
NUMBER : [0-9]+;
WS : (' '|'\n') -> skip;
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy