# HG changeset patch # User Christian Urban # Date 1385956658 0 # Node ID 599e6a6ab6c6ff4f24a64e067199655cf4f15710 # Parent 8f3f8d82da8b60a14525dd5666e1bef572aa2aff added diff -r 8f3f8d82da8b -r 599e6a6ab6c6 progs/compile-lexer.scala --- 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 } ||