gazelle-parser 0.9.3

LR parser generator with runtime operator precedence and natural lexer feedback
Documentation
1
2
3
4
5
6
7
8
9
10
// Classic ambiguous expression grammar (shift/reduce conflict)
// expr + expr + expr: left-associate or right-associate?

start expr;

terminals { PLUS, TIMES, NUM }

expr = expr PLUS expr => add
     | expr TIMES expr => mul
     | NUM => num;