Skip to content

adl rules have no operator precedence #4

Description

@pieterbos

The operators in the rules section have no operator precedence. It's very useful to include this in the antlr grammar. Something along the lines of:

expr:  mult ('+' mult)* ;
mult:  atom ('*' atom)* ;
atom:  INT | '(' expr ')' ;

You can then simply walk the tree to evaluate expressions.

Useful both for arithmetic and boolean expressions.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions