-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fixing reserve word NULL for cpp targets #3889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing reserve word NULL for cpp targets #3889
Conversation
Signed-off-by: 1sand0s <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add new or extend the existing test ReservedWordsEscaping.txt that covers suggested changes.
bf5e884 to
b20db8c
Compare
I had not though about this, but I guess some of the fix PRs did not have one fix that was in the legacy version of the runtime, copied in to the v4 branch. This commit fixes that. Signed-off-by: Jim.Idle <[email protected]> Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: Terence Parr <[email protected]> Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: Terence Parr <[email protected]> Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: Terence Parr <[email protected]> Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: Terence Parr <[email protected]> Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: 1sand0s <[email protected]>
515dc16 to
d26c064
Compare
|
Could you please get rid of unrelated commits (using interactive rebase)? Some changes are unrelated to the topic. |
Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: 1sand0s <[email protected]>
Signed-off-by: 1sand0s <[email protected]>
…thub.com/1sand0s/antlr4 into Fixing_Reserve_Word_NULL_for_Cpp_Targets
@KvanTTT Done ! |
@KvanTTT Just a reminder that I have removed unrelated commits. Thanks ! |
|
I see unrelated commits anyway. @parrt the changes look good to me, but I suggest squashing all commits since most of them are useless. |
|
Looks like we have a merge conflict. Can you take a look / rebase? |
@parrt I compared the |
|
AH. it was set at rebase not merge. A merge will work. thanks! |
PR Summary
NULLwhich is a reserve word inCpp. This PR addsNULLto the list of reserve words inCppTarget.java.Stringarguments ofgetTargetStringLiteralFromStringandgetTargetStringLiteralFromANTLRStringLiteralinTarget.java,sandliteralrespectively, toTarget'sescapeIfNeededfunction since potential reserve words must be handled before being accumulated into the StringBuildersg.tokenNameToTypeMapinRecognizertoTarget'sescapeIfNeededfunction before being inserted intotokensinRecognizerBest