changeset 64 | 2d625418c011 |
parent 62 | 5988e44ea048 |
child 71 | 7717f20f0504 |
--- a/parser2a.scala Wed Nov 14 08:46:00 2012 +0000 +++ b/parser2a.scala Mon Nov 19 14:18:42 2012 +0000 @@ -94,7 +94,7 @@ } } -lazy val E: Parser[Int] = (T ~ T_OP("+") ~ E) ==> { case ((x, y), z) => x + z } || T // start symbol +lazy val E: Parser[Int] = (T ~ T_OP("+") ~ E) ==> { case ((x, y), z) => x + z } || T lazy val T: Parser[Int] = (F ~ T_OP("*") ~ T) ==> { case ((x, y), z) => x * z } || F lazy val F: Parser[Int] = (T_LPAREN ~> E <~ T_RPAREN) || NumParser