--- a/while1.scala Wed Nov 28 08:28:26 2012 +0000
+++ b/while1.scala Mon Dec 03 15:35:27 2012 +0000
@@ -1,7 +1,8 @@
-// A parser and evaluator for teh while language
+// A parser and evaluator for the WHILE language
//
-//:load matcher.scala
-//:load parser3.scala
+import matcher._
+import parser._
+
// some regular expressions
val SYM = RANGE("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvwxyz_")
@@ -32,7 +33,7 @@
case class T_NUM(s: String) extends Token
case class T_KWD(s: String) extends Token
-val lexing_rules: List[Rule[Token]] =
+val lexing_rules: List[(Rexp, List[Char] => Token)] =
List((KEYWORD, (s) => T_KWD(s.mkString)),
(ID, (s) => T_ID(s.mkString)),
(OP, (s) => T_OP(s.mkString)),