--- a/progs/compile-lexer.scala Sun Dec 01 10:18:50 2013 +0000
+++ b/progs/compile-lexer.scala Mon Dec 02 03:57:38 2013 +0000
@@ -309,8 +309,8 @@
(T ~ T_OP("-") ~ AExp) ==> { case ((x, y), z) => Aop("-", x, z): AExp } || T
lazy val T: Parser[List[Token], AExp] =
(F ~ T_OP("*") ~ T) ==> { case ((x, y), z) => Aop("*", x, z): AExp } ||
- (F ~ T_OP("/") ~ T) ==> { case ((x, y), z) => Aop("*", x, z): AExp } ||
- (F ~ T_OP("%") ~ T) ==> { case ((x, y), z) => Aop("*", x, z): AExp } || F
+ (F ~ T_OP("/") ~ T) ==> { case ((x, y), z) => Aop("/", x, z): AExp } ||
+ (F ~ T_OP("%") ~ T) ==> { case ((x, y), z) => Aop("%", x, z): AExp } || F
lazy val F: Parser[List[Token], AExp] =
(T_LPAREN ~ AExp ~ T_RPAREN) ==> { case ((x, y), z) => y: AExp }||
IdParser ==> { case x => Var(x): AExp } ||