From deb235f3045138908339cec56f0ce34dbb4e936b Mon Sep 17 00:00:00 2001 From: Alex AUVOLAT Date: Sat, 16 Nov 2013 10:57:43 +0100 Subject: Started parser anew --- src/lexer.mll | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lexer.mll') diff --git a/src/lexer.mll b/src/lexer.mll index 7daa65c..763bd37 100644 --- a/src/lexer.mll +++ b/src/lexer.mll @@ -8,7 +8,6 @@ open Parser exception Lexing_error of string - exception End_of_file let keywordz_l = [ "class", CLASS; @@ -33,7 +32,7 @@ List.iter (fun (s, t) -> Hashtbl.add h s t) keywordz_l; fun s -> try Hashtbl.find h s with _ -> - if Sset.mem (!type_names) s + if Ast.Sset.mem s !Ast.type_names then TIDENT s else IDENT s @@ -92,7 +91,8 @@ rule token = parse | "<<" { LFLOW } | "{" { LBRACE } | "}" { RBRACE } - | eof { raise End_of_file } + | "," { COMMA } + | eof { EOF } | _ as c { raise (Lexing_error -- cgit v1.2.3