Open garymazz opened 6 years ago
A quick fix
Alter token in TSqlLexer.g4 to:
STRING: ('N' '\'' (~'\'' | '\'''\'')* '\'') | ('\'' (~'\'' | '\'''\'')* '\'') ;
Maybe the more short record?
STRING: 'N'? '\'' (~'\'' | '\'\'')* '\'';
The shorter version was not matching using 4.7.1.
What tokens did you get for rule STRING: 'N'? '\'' (~'\'' | '\'\'')* '\''
with ANTLR 4.7.1?
It was weird... I got the tokens, but they were not matching. In one case text N'text' would not match. In other's "text' would not match. I'm thinking it may be an antlr bug(??).. I need to get through my first pass of the grammar, then loop back around for some deeper dives.
Maybe there is a tokens ambiguity.
Thanks Ivan... I was thinking the same way.. I'll look into it in more detail at the end of the week. Right now I have some issues related to context aware parsing
On Sun, Apr 1, 2018 at 5:14 PM, Ivan Kochurkin notifications@github.com wrote:
Maybe there is a tokens ambiguity.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/antlr/grammars-v4/issues/1092#issuecomment-377824188, or mute the thread https://github.com/notifications/unsubscribe-auth/ABobgtyKdh3ctuUboRLZwWrSjRElA1Paks5tkV9LgaJpZM4TCC0U .
For some odd reason the token is mismatched to a valid string:
Test Values:
Token in TSqlLexer.g4:
STRING: 'N'? '\'' (~'\'' | '\'\'')* '\'';