Skip to content
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

[antlr4 grammar/CI build] Fix for 2609 #2610

Merged
merged 4 commits into from
May 8, 2022
Merged

[antlr4 grammar/CI build] Fix for 2609 #2610

merged 4 commits into from
May 8, 2022

Conversation

kaby76
Copy link
Contributor

@kaby76 kaby76 commented May 6, 2022

This PR is for the antlr/antlr4/ grammar #2609. There's also a change to the build, but that is only for supporting Cpp split grammars with base class code that needs to be compiled and linked.

  • Updated the antlr/antlr4 grammar with the new 4.10.1 syntax for caseInsensitive.
  • Synced the base class code between targets. The targets that are implemented are Cpp, CSharp, Java, JavaScript, and Python3; I did not implement any new targets.
  • Added the antlr/antlr4/ grammar to CI testing to help prevent targets from becoming out of sync.
  • Note, forking of the antlr/antlr4/ grammar was required for Cpp and Python3. This is because there really is no such thing as "target agnostic format", but what i call "pseudo target agnostic format". It's a syntax that is identical for most, but not all, targets. We can get "target agnostic format", but only if we introduce a syntax for "self", e.g., $parser and $lexer handles with a '.' reference. Cpp will also need to generate a #include for the base class, which the Antlr4 tool does not do.
  • trgen needed to be updated to fix a bug in the reference to the "additional_sources" attribute used in the CMakeLists.txt templated file.
  • There is a difference between this grammar and the one in the Intellij Antlr plugin in lexing options, but I haven't resolved that difference. Instead, I just added a "TODO".

@kaby76 kaby76 marked this pull request as draft May 6, 2022 10:48
@kaby76
Copy link
Contributor Author

kaby76 commented May 6, 2022

  • No short cuts--I need to update trgen to add all source files in the Cpp/ to the generated CMakeLists.txt file, and remove antlr/antlr4/Cpp/CMakeLists.txt that only works on my system.

@kaby76 kaby76 marked this pull request as ready for review May 7, 2022 08:22
@kaby76 kaby76 changed the title [antlr/antlr4] Fix for 2609 [antlr/antlr4 and CI build] Fix for 2609 May 7, 2022
@kaby76 kaby76 changed the title [antlr/antlr4 and CI build] Fix for 2609 [antlr4 grammar/CI build] Fix for 2609 May 7, 2022
@teverett
Copy link
Member

teverett commented May 8, 2022

@kaby76 thanks

@teverett teverett merged commit eb2248f into antlr:master May 8, 2022
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.

2 participants