Skip to content

Conversation

@yuxuanchen1997
Copy link

@yuxuanchen1997 yuxuanchen1997 commented Mar 21, 2025

Signed-off-by: Yuxuan Chen [email protected]

antlr-common.h attempts to undefine EOF and leaves it in an undefined state. However, this breaks when you attempt to include header that expects EOF to be there. (e.g. you can't include any more after including antlr-runtime.h)

This patch proposes using push_macro to save the EOF macro before we try to do anything and pop_macro right before the end of antlr-runtime.h.

@yuxuanchen1997 yuxuanchen1997 force-pushed the users/yuxuanchen1997/fix-antlr-common-eof-undef branch from f8e1ad7 to a172cd8 Compare March 21, 2025 17:20
@yuxuanchen1997 yuxuanchen1997 changed the title [antlr4] Make sure EOF is still defined after including antlr-runtime.h [antlr4] Do not leave EOF in an undefined state after including antlr-runtime.h Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant