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

Modeler 4.4: expression parsing [ANT-2313] #2471

Merged
merged 95 commits into from
Nov 25, 2024

Conversation

payetvin
Copy link
Contributor

@payetvin payetvin commented Oct 23, 2024

This pull request includes several updates and improvements to the ANTLR grammar and related files for the Expr language. The changes involve modifications to the grammar rules, updates to the CMake configuration, and synchronization with a newer version of ANTLR.

Grammar and Parsing Improvements:

  • Refactored Expr.g4 grammar to introduce new rules and improve parsing capabilities, including the addition of atom, shift_expr, and right_expr rules. [1] [2]
  • Updated Expr.tokens to reflect new token definitions and changes in the grammar.
  • Removed redundant rules and tokens from Expr.g4 and Expr.tokens. [1] [2]

Build Configuration Updates:

  • Updated sonar-project.properties to exclude src/libs/antares/antlr-interface from Sonar analysis. antlr-interface contains generated code that trigger defect in analysis
  • Modified CMakeLists.txt to always include the antlr-interface directory and removed conditional logic for building with ANTLR4. [1] [2] [3]

Synchronization with ANTLR 4.13.2:

  • Updated generated files to be compatible with ANTLR 4.13.2, including ExprBaseVisitor.cpp, ExprBaseVisitor.h, and ExprLexer.cpp. [1] [2] [3]
  • Adjusted ExprLexer.cpp to use std::unique_ptr for static data initialization. [1] [2]

Visitor Pattern Enhancements:

  • Updated ExprBaseVisitor to include new visit methods for the added grammar rules. [1] [2]

These changes collectively enhance the flexibility and maintainability of the grammar and build configuration, while ensuring compatibility with the latest ANTLR version.

@payetvin payetvin added this to the Sprint 10 milestone Oct 23, 2024
@payetvin payetvin self-assigned this Oct 23, 2024
@payetvin payetvin changed the title Modeler 4.4: expression parsing Modeler 4.4: expression parsing [ANT-2313] Oct 23, 2024
@a-zakir
Copy link
Contributor

a-zakir commented Oct 24, 2024

add antlr4 here

@flomnes flomnes merged commit 0d9e6d4 into develop Nov 25, 2024
9 checks passed
@flomnes flomnes deleted the feature/4.4-expression-parsing branch November 25, 2024 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants