I'm triying to use ANTLR with a kind of file where the value to retrieve can be any sequence of chars excluding { and }.
text = {Valid;String}
text = {Another"Valid"-String}
But now VALUE is matching the line from the begining:
line 1:0 mismatched input 'text = ' expecting 'text'
What I'm doing wrong? Should not match with TEXT first?
grammar Example;
example : (TEXT '=' '{' VALUE '}')+;
WS : [ \t\r\n]+ -> skip ;
TEXT : 'text';
VALUE : ~('{'|'}')+;