1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Factor : @{ Int # built-in 64-bit signed integer token '(' Expr ')' } Term : @{ Term '*' Factor $1 * $3 Term '/' Factor $1 / $3 Factor } Expr : @{ Expr '+' Term $1 + $3 Expr '-' Term $1 - $3 Term } Expr