@Algorithm(lalr, 1) // The parser catches a forgotten precedence annotation. Expr: if Expr | Expr + Expr | Expr - Expr | Expr * Expr | - Expr | INT // whoops: we forgot to annotate 'if' ! //@precedence(Expr, 0, right = 1) @precedence(Expr, 1, left = 2, right = 3) @precedence(Expr, 2, left = 2, right = 3) @precedence(Expr, 3, left = 4, right = 5) @precedence(Expr, 4, right = 6)