-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Description
The new option caseInsensitive
works great and it simplifies grammar a lot. But there are some lexer rule exceptions where it should be disabled. For instance, case-insensitivity affects lexing process for the following rule because a string starting with lower n
is incorrect in TSql, MySql, but a string starting with upper N
is correct. Enabled caseInsensitive
allows both strings:
options { caseInsensitive=true; }
STRING: 'N'? '\'' (~'\'' | '\'\'')* '\'';
It's possible to check online the following string: SELECT N'sample';
I suggest adding a new lexer rule option caseInsensitive
that naturally disables/enables case insensitivity for certain rules:
options { caseInsensitive=true; }
STRING options { caseInsensitive=false; } : 'N'? '\'' (~'\'' | '\'\'')* '\'';
Metadata
Metadata
Assignees
Labels
No labels