org.antlr.v4.test.runtime.templates.ParserExec.IfIfElseGreedyBinding1.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.
TestType() ::= "Parser"
Options ::= [
"Debug": false
]
Grammar ::= [
"T": {}
]
Input() ::= "if y if y x else x"
Rule() ::= "start"
Output() ::= <<
if y x else x
if y if y x else x<\n>
>>
Errors() ::= ""
grammar(grammarName) ::= <<
grammar ;
start : statement+ ;
statement : 'x' | ifStatement;
ifStatement : 'if' 'y' statement ('else' statement)? {
};
ID : 'a'..'z'+ ;
WS : (' '|'\n') -> channel(HIDDEN);
>>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy