equal
deleted
inserted
replaced
131 def parse(tsb: List[Token]) = tsb match { |
131 def parse(tsb: List[Token]) = tsb match { |
132 case T_STRING(s) :: rest => Set((s, rest)) |
132 case T_STRING(s) :: rest => Set((s, rest)) |
133 case _ => Set() |
133 case _ => Set() |
134 } |
134 } |
135 } |
135 } |
|
136 |
136 |
137 |
137 |
138 |
138 // WHILE Language Parsing |
139 // WHILE Language Parsing |
139 lazy val AExp: Parser[List[Token], AExp] = |
140 lazy val AExp: Parser[List[Token], AExp] = |
140 (Te ~ T_OP("+") ~ AExp).map{ case x ~ _ ~ z => Aop("+", x, z): AExp } || |
141 (Te ~ T_OP("+") ~ AExp).map{ case x ~ _ ~ z => Aop("+", x, z): AExp } || |