progs/compile-lexer.scala
changeset 323 4ce07c4abdb4
parent 227 93bd75031ced
child 704 6d9c960a2b26
--- a/progs/compile-lexer.scala	Thu Apr 09 07:42:23 2015 +0100
+++ b/progs/compile-lexer.scala	Fri Apr 10 18:02:04 2015 +0100
@@ -112,8 +112,8 @@
 
 
 // regular expressions for the While language
-val SYM = RANGE("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_")
-val DIGIT = RANGE("0123456789")
+val SYM = RANGE("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_".toList)
+val DIGIT = RANGE("0123456789".toList)
 val ID = SYM ~ (SYM | DIGIT).% 
 val NUM = PLUS(DIGIT)
 val KEYWORD : Rexp = "skip" | "while" | "do" | "if" | "then" | "else" | "read" | "write" | "true" | "false"
@@ -131,7 +131,7 @@
 val STRING = "\"" ~ ALL.% ~ "\""
 
 
-// token for While languag
+// token for While language
 abstract class Token
 case object T_WHITESPACE extends Token
 case object T_SEMI extends Token