Removed subtraction and division from the example grammar because of wrong associativity.

redux
David Majda 15 years ago
parent c35417c345
commit aff85fd228

@ -6,11 +6,9 @@
start : additive
additive : multiplicative "+" additive { return $1 + $3; }
/ multiplicative "-" additive { return $1 - $3; }
/ multiplicative
multiplicative : primary "*" multiplicative { return $1 * $3; }
/ primary "/" multiplicative { return $1 / $3; }
/ primary
primary : integer

Loading…
Cancel
Save