Assign precedence to ASSIGN
[tiger.ml.git] / tiger / src / lib / tiger / tiger_lexer.mll
index c19eabf..359366f 100644 (file)
@@ -1,5 +1,5 @@
 {
-  open Tiger_parser.Token
+  open Tiger_parser
 
   let comment_level = ref 0
   let string_buf    = Buffer.create 100
@@ -10,9 +10,7 @@ let num = ['0'-'9']
 let newline = '\n' | '\r' | "\n\r"
 
 rule token = parse
-  | eof {
-      EOF
-  }
+  | eof {EOF}
 
   (* Track line number *)
   | newline {
@@ -83,7 +81,7 @@ rule token = parse
       | "type"     -> TYPE
       | "var"      -> VAR
       | "while"    -> WHILE
-      | _          -> ID id
+      | _          -> (ID id)
   }
 and string_literal = parse
   (* Keep escaped quote marks as part of the string literal *)
@@ -104,10 +102,8 @@ and string_literal = parse
       string_literal lexbuf
   }
 and comment = parse
-  | eof {
-      (* TODO: Error: unterminated comment? or we don't care? *)
-      EOF
-  }
+  (* TODO: Error: unterminated comment? or we don't care? *)
+  | eof {EOF}
 
   (* Track line number *)
   | newline {
This page took 0.024317 seconds and 4 git commands to generate.