diff options
author | Alex AUVOLAT <alex.auvolat@ens.fr> | 2013-11-16 10:57:43 +0100 |
---|---|---|
committer | Alex AUVOLAT <alex.auvolat@ens.fr> | 2013-11-16 10:57:43 +0100 |
commit | deb235f3045138908339cec56f0ce34dbb4e936b (patch) | |
tree | 8adc5dbee6113c25c2c0588a6d3c2fb20db58ad8 /src/lexer.mll | |
parent | 5dacc48b53568f673b03de794a9a13f7a5c11b0f (diff) | |
download | LPC-Projet-deb235f3045138908339cec56f0ce34dbb4e936b.tar.gz LPC-Projet-deb235f3045138908339cec56f0ce34dbb4e936b.zip |
Started parser anew
Diffstat (limited to 'src/lexer.mll')
-rw-r--r-- | src/lexer.mll | 6 |
1 files changed, 3 insertions, 3 deletions
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 |