Fixed a bug in the example grammar where integers beginning with 0 were parsed as octal.

redux
David Majda 15 years ago
parent aff85fd228
commit 8f2aa1e834

@ -14,4 +14,4 @@ multiplicative : primary "*" multiplicative { return $1 * $3; }
primary : integer
/ "(" additive ")" { return $2; }
integer "integer" : [0-9]+ { return parseInt($1.join("")); }
integer "integer" : [0-9]+ { return parseInt($1.join(""), 10); }

Loading…
Cancel
Save