@Algorithm(lalr, 1) // Very simple expression language, that uses the ordering of rules to determine // precedence. Expr: Term Term: Term + Fact | Term - Fact | Fact Fact: Fact * Neg | Fact / Neg | Neg Neg: - Neg | Final Final: INT @example(INT + INT) @example(INT + INT - INT) @example(INT * INT + INT) @example(INT * INT + - INT / INT)