org.antlr.v4.test.runtime.templates.LexerExec.Parentheses.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#224: "Parentheses without
* quantifier in lexer rules have unclear effect".
* https://github.com/antlr/antlr4/issues/224
*/
TestType() ::= "Lexer"
Grammar ::= [
"L": {}
]
Input() ::= <%
-.-.-!
%>
Output() ::= <<
[@0,0:4='-.-.-',\<1>,1:0]
[@1,5:5='!',\<3>,1:5]
[@2,6:5='\',\<-1>,1:6]<\n>
>>
Errors() ::= ""
grammar(grammarName) ::= <<
lexer grammar ;
START_BLOCK: '-.-.-';
ID : (LETTER SEPARATOR) (LETTER SEPARATOR)+;
fragment LETTER: L_A|L_K;
fragment L_A: '.-';
fragment L_K: '-.-';
SEPARATOR: '!';
>>
© 2015 - 2024 Weber Informatics LLC | Privacy Policy