org.antlr.v4.test.runtime.templates.ParserExec.OpenDeviceStatement.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.
/*
* This is a regression test for antlr/antlr4#1545.
*/
TestType() ::= "Parser"
Options ::= [
"Debug": false
]
Rule() ::= "statement"
Output() ::= "OPEN DEVICE DEVICE<\n>"
Errors() ::= ""
grammar(grammarName, opt1) ::= <<
grammar ;
program : statement+ '.' ;
statement : 'OPEN' ( 'DEVICE' ( | OPT2 | OPT3 )? )+ {} ;
OPT1 : 'OPT-1';
OPT2 : 'OPT-2';
OPT3 : 'OPT-3';
WS : (' '|'\n')+ -> channel(HIDDEN);
>>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy