-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Fixing reserve word NULL for cpp targets #3889
Conversation
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
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 <jimi@gatherstars.com> Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: Terence Parr <parrt@antlr.org> Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: Terence Parr <parrt@antlr.org> Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: Terence Parr <parrt@antlr.org> Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
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 <1sand0sardpi@gmail.com>
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
Signed-off-by: 1sand0s <1sand0sardpi@gmail.com>
…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
NULL
which is a reserve word inCpp
. This PR addsNULL
to the list of reserve words inCppTarget.java
.String
arguments ofgetTargetStringLiteralFromString
andgetTargetStringLiteralFromANTLRStringLiteral
inTarget.java
,s
andliteral
respectively, toTarget's
escapeIfNeeded
function since potential reserve words must be handled before being accumulated into the StringBuildersg.tokenNameToTypeMap
inRecognizer
toTarget's
escapeIfNeeded
function before being inserted intotokens
inRecognizer
Best