Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Leclerc <[email protected]>
  • Loading branch information
sylvlecl committed Feb 14, 2024
1 parent 983c740 commit bd01e63
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions grammar/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Expression grammar definition

[Expr.g4](Expr.g4) defines the grammar for mathematical expressions
use for defining constraints, objective, etc.

[ANTLR](https://www.antlr.org) needs to be used to generate the associated
parser code, which must be placed in [andromede.expression.parsing.antlr](/src/andromede/expression/parsing/antlr)
package.

ANTLR may be used on the command line, or for example through
the associated PyCharm plugin.

We use the visitor and not the listener in order to translate ANTLR AST
into our own AST, so the options `-visitor` and `-no-listener` need to
to be used.

0 comments on commit bd01e63

Please sign in to comment.