All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.antlr.v4.test.runtime.templates.LexerExec.Parentheses.stg Maven / Gradle / Ivy

There is a newer version: 4.9.0
Show newest version
/*
 * 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