# 1 "lexer.mll" open Parser open Support.Error let reservedWords = [ ("int", fun i -> INTTY i); ("this", fun i -> THIS i); ("short", fun i -> SHORTTY i); ("long", fun i -> LONGTY i); ("float", fun i -> FLOATTY i); ("double", fun i -> DOUBLETY i); ("bool", fun i -> BOOLTY i); ("string", fun i -> STRINGTY i); ("char", fun i -> CHARTY i); ("wchar_t", fun i -> WCHARTY i); ("unsigned", fun i -> UNSIGNED i); ("signed", fun i -> SIGNED i); ("const", fun i -> CONST i); ("true", fun i -> TRUE i); ("false", fun i -> FALSE i); ("fun", fun i -> FUN i); ("primitive", fun i -> PRIMITIVE i); ("try", fun i -> TRY i); ("catch", fun i -> CATCH i); ("throw", fun i -> THROW i); ("exists", fun i -> EXISTS i); ("unpack", fun i -> UNPACK i); ("mutable", fun i -> MUTABLE i); ("void", fun i -> VOIDTY i); ("nullptr", fun i -> NULLPTR i); ("let", fun i -> LET i); ("and", fun i -> AND i); ("or", fun i -> OR i); ("not", fun i -> NOT i); ("negate", fun i -> NEG i); ("cast", fun i -> CAST i); ("switch", fun i -> SWITCH i); ("case", fun i -> CASE i); ("default", fun i -> DEFAULT i); ("operator", fun i -> OPERATOR i); ("if", fun i -> IF i); ("else", fun i -> ELSE i); ("while", fun i -> WHILE i); ("do", fun i -> DO i); ("for", fun i -> FOR i); ("return", fun i -> RETURN i); ("struct", fun i -> STRUCT i); ("union", fun i -> UNION i); ("class", fun i -> CLASS i); ("concept", fun i -> CONCEPT i); ("model", fun i -> MODEL i); ("refines", fun i -> REFINES i); ("require", fun i -> REQUIRE i); ("where", fun i -> WHERE i); ("module", fun i -> MODULE i); ("private", fun i -> PRIVATE i); ("public", fun i -> PUBLIC i); ("import", fun i -> IMPORT i); ("include_c", fun i -> INCLUDE i); ("use", fun i -> USE i); ("open", fun i -> OPEN i); ("from", fun i -> FROM i); ("as", fun i -> AS i); ("type", fun i -> TYPE i); ("sizeof", fun i -> SIZEOF i); ("new", fun i -> NEW i); ("placement_new", fun i -> PLACEMENT_NEW i); ("GC", fun i -> GC i); ("array", fun i -> ARRAY i); ("delete", fun i -> DELETE i); ("destroy", fun i -> DESTROY i); ("extern", fun i -> EXTERN i); ("|", fun i -> BAR i); ("(", fun i -> LPAREN i); (")", fun i -> RPAREN i); ("{", fun i -> LBRACE i); ("}", fun i -> RBRACE i); ("[", fun i -> LBRACK i); ("]", fun i -> RBRACK i); (";", fun i -> SEMICOLON i); (":", fun i -> COLON i); ("=", fun i -> ASSIGN i); ("...", fun i -> ELIPSES i); (".", fun i -> DOT i); (",", fun i -> COMMA i); ("->", fun i -> ARROW i); ("/\\", fun i -> INTER i); ("*", fun i -> STAR i); ("<<", fun i -> OUTPUT i); (">>", fun i -> INPUT i); ("<", fun i -> LT i); (">", fun i -> GT i); ("<=", fun i -> LEQ i); (">=", fun i -> GEQ i); ("==", fun i -> EQ i); ("!=", fun i -> NEQ i); ("!", fun i -> BANG i); ("++", fun i -> INC i); ("+=", fun i -> PLUSASSIGN i); ("+", fun i -> PLUS i); ("--", fun i -> DEC i); ("-", fun i -> SUB i); ("/", fun i -> DIV i); ("@", fun i -> AT i); ("%", fun i -> PERCENT i); ("?", fun i -> QMARK i); ("~", fun i -> TILDE i); ("&", fun i -> AMP i) ] (* Support functions *) type buildfun = info -> Parser.token let (symbolTable : (string,buildfun) Hashtbl.t) = Hashtbl.create 1024 let _ = List.iter (fun (str,f) -> Hashtbl.add symbolTable str f) reservedWords let createID i str = try (Hashtbl.find symbolTable str) i with _ -> NAME {i=i;v=str} let lineno = ref 1 and depth = ref 0 and start = ref 0 and filename = ref "" and startLex = ref dummyinfo (* Wrong! *) let create inFile stream = if not (Filename.is_implicit inFile) then filename := inFile else filename := inFile; lineno := 1; start := 0; Lexing.from_channel stream let newline lexbuf = incr lineno; start := (Lexing.lexeme_start lexbuf) let info lexbuf = createInfo (!filename) (!lineno) (Lexing.lexeme_start lexbuf - !start) let text = Lexing.lexeme let stringBuffer = ref (String.create 2048) let stringEnd = ref 0 let resetStr () = stringEnd := 0 let addStr ch = let x = !stringEnd in let buffer = !stringBuffer in if x = String.length buffer then begin let newBuffer = String.create (x*2) in String.blit buffer 0 newBuffer 0 x; String.set newBuffer x ch; stringBuffer := newBuffer; stringEnd := x+1 end else begin String.set buffer x ch; stringEnd := x+1 end let getStr () = String.sub (!stringBuffer) 0 (!stringEnd) let extractLineno yytext offset = int_of_string (String.sub yytext offset (String.length yytext - offset)) # 179 "lexer.ml" let __ocaml_lex_tables = { Lexing.lex_base = "\000\000\239\255\240\255\241\255\046\000\242\255\066\000\069\000\ \033\000\035\000\088\000\088\000\103\000\040\000\180\000\130\000\ \092\000\088\000\254\255\004\000\253\255\251\255\252\255\031\000\ \191\000\032\000\209\000\028\000\039\000\109\000\219\000\229\000\ \033\000\043\000\113\000\252\000\006\001\016\001\107\000\249\000\ \108\000\245\255\244\255\102\000\245\000\114\000\121\000\255\255\ \154\000\217\000\133\000\064\001\065\001\132\000\184\000\066\001\ \053\001\249\255\029\001\063\001\250\255"; Lexing.lex_backtrk = "\255\255\255\255\255\255\255\255\013\000\255\255\013\000\013\000\ \013\000\013\000\013\000\013\000\012\000\013\000\008\000\016\000\ \013\000\013\000\255\255\000\000\255\255\255\255\255\255\255\255\ \255\255\255\255\005\000\255\255\255\255\255\255\255\255\006\000\ \255\255\255\255\255\255\255\255\007\000\009\000\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\003\000\003\000\255\255\ \255\255\255\255\255\255\255\255\000\000\255\255\000\000\255\255\ \255\255\255\255\006\000\255\255\255\255"; Lexing.lex_default = "\001\000\000\000\000\000\000\000\255\255\000\000\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\038\000\255\255\255\255\ \255\255\255\255\000\000\255\255\000\000\000\000\000\000\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\000\000\000\000\255\255\022\000\255\255\255\255\000\000\ \047\000\255\255\255\255\052\000\052\000\255\255\054\000\021\000\ \057\000\000\000\255\255\255\255\000\000"; Lexing.lex_trans = "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\019\000\018\000\000\000\019\000\019\000\018\000\000\000\ \019\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \019\000\009\000\003\000\015\000\019\000\005\000\005\000\013\000\ \005\000\005\000\017\000\010\000\005\000\011\000\004\000\016\000\ \014\000\014\000\014\000\014\000\014\000\014\000\014\000\014\000\ \014\000\014\000\005\000\005\000\007\000\008\000\006\000\005\000\ \005\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\005\000\043\000\005\000\005\000\012\000\ \005\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\005\000\005\000\005\000\005\000\005\000\ \005\000\005\000\005\000\005\000\039\000\005\000\022\000\020\000\ \032\000\027\000\028\000\021\000\029\000\030\000\012\000\033\000\ \034\000\035\000\041\000\042\000\005\000\005\000\005\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\018\000\024\000\047\000\018\000\050\000\054\000\047\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\255\255\000\000\000\000\000\000\012\000\000\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\037\000\018\000\014\000\014\000\014\000\014\000\ \014\000\014\000\014\000\014\000\014\000\014\000\023\000\026\000\ \026\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\ \026\000\050\000\000\000\047\000\000\000\000\000\000\000\021\000\ \002\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\ \026\000\026\000\026\000\031\000\031\000\031\000\031\000\031\000\ \031\000\031\000\031\000\031\000\031\000\031\000\031\000\031\000\ \031\000\031\000\031\000\031\000\031\000\031\000\031\000\045\000\ \041\000\000\000\000\000\000\000\046\000\000\000\000\000\000\000\ \255\255\040\000\000\000\025\000\036\000\036\000\036\000\036\000\ \036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\ \036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\ \037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\ \037\000\037\000\255\255\255\255\020\000\059\000\059\000\059\000\ \059\000\059\000\059\000\059\000\059\000\059\000\059\000\022\000\ \000\000\000\000\000\000\000\000\021\000\000\000\000\000\000\000\ \000\000\000\000\255\255\255\255\047\000\058\000\058\000\058\000\ \058\000\058\000\058\000\058\000\058\000\058\000\058\000\060\000\ \060\000\060\000\060\000\060\000\060\000\060\000\060\000\060\000\ \060\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\020\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\255\255\000\000\000\000\000\000\018\000\000\000\ \000\000\000\000\000\000\047\000\000\000\000\000\000\000\000\000\ \000\000\018\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \255\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\020\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\255\255\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \255\255\255\255\022\000"; Lexing.lex_check = "\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\000\000\000\000\255\255\000\000\019\000\019\000\255\255\ \019\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \000\000\000\000\000\000\000\000\019\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\004\000\000\000\008\000\000\000\ \009\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\006\000\ \006\000\007\000\007\000\010\000\013\000\011\000\016\000\017\000\ \023\000\025\000\027\000\016\000\028\000\029\000\012\000\032\000\ \033\000\034\000\038\000\040\000\043\000\010\000\011\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\045\000\015\000\046\000\048\000\050\000\053\000\050\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\054\000\255\255\255\255\255\255\012\000\255\255\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\012\000\012\000\012\000\012\000\012\000\012\000\ \012\000\012\000\014\000\049\000\014\000\014\000\014\000\014\000\ \014\000\014\000\014\000\014\000\014\000\014\000\015\000\024\000\ \024\000\024\000\024\000\024\000\024\000\024\000\024\000\024\000\ \024\000\049\000\255\255\049\000\255\255\255\255\255\255\044\000\ \000\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\ \026\000\026\000\026\000\030\000\030\000\030\000\030\000\030\000\ \030\000\030\000\030\000\030\000\030\000\031\000\031\000\031\000\ \031\000\031\000\031\000\031\000\031\000\031\000\031\000\044\000\ \039\000\255\255\255\255\255\255\044\000\255\255\255\255\255\255\ \013\000\039\000\255\255\024\000\035\000\035\000\035\000\035\000\ \035\000\035\000\035\000\035\000\035\000\035\000\036\000\036\000\ \036\000\036\000\036\000\036\000\036\000\036\000\036\000\036\000\ \037\000\037\000\037\000\037\000\037\000\037\000\037\000\037\000\ \037\000\037\000\051\000\052\000\055\000\058\000\058\000\058\000\ \058\000\058\000\058\000\058\000\058\000\058\000\058\000\056\000\ \255\255\255\255\255\255\255\255\056\000\255\255\255\255\255\255\ \255\255\255\255\051\000\052\000\055\000\056\000\056\000\056\000\ \056\000\056\000\056\000\056\000\056\000\056\000\056\000\059\000\ \059\000\059\000\059\000\059\000\059\000\059\000\059\000\059\000\ \059\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\056\000\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\048\000\255\255\255\255\255\255\055\000\255\255\ \255\255\255\255\255\255\056\000\255\255\255\255\255\255\255\255\ \255\255\056\000\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \054\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\044\000\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\056\000\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \051\000\052\000\055\000"; Lexing.lex_base_code = ""; Lexing.lex_backtrk_code = ""; Lexing.lex_default_code = ""; Lexing.lex_trans_code = ""; Lexing.lex_check_code = ""; Lexing.lex_code = ""; } let rec main lexbuf = __ocaml_lex_main_rec lexbuf 0 and __ocaml_lex_main_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 180 "lexer.mll" ( main lexbuf ) # 377 "lexer.ml" | 1 -> # 182 "lexer.mll" ( newline lexbuf; main lexbuf ) # 382 "lexer.ml" | 2 -> # 184 "lexer.mll" ( error (info lexbuf) "Unmatched end of comment" ) # 387 "lexer.ml" | 3 -> # 186 "lexer.mll" ( depth := 1; startLex := info lexbuf; comment lexbuf; main lexbuf ) # 392 "lexer.ml" | 4 -> # 188 "lexer.mll" ( startLex := info lexbuf; cpp_comment lexbuf; main lexbuf ) # 397 "lexer.ml" | 5 -> # 191 "lexer.mll" ( lineno := extractLineno (text lexbuf) 2 - 1; getFile lexbuf ) # 402 "lexer.ml" | 6 -> # 194 "lexer.mll" ( lineno := extractLineno (text lexbuf) 7 - 1; getFile lexbuf ) # 407 "lexer.ml" | 7 -> # 197 "lexer.mll" ( lineno := extractLineno (text lexbuf) 6 - 1; getFile lexbuf ) # 412 "lexer.ml" | 8 -> # 200 "lexer.mll" ( INT{i=info lexbuf; v=int_of_string (text lexbuf)} ) # 417 "lexer.ml" | 9 -> # 203 "lexer.mll" ( DOUBLE{i=info lexbuf; v=float_of_string (text lexbuf)} ) # 422 "lexer.ml" | 10 -> # 206 "lexer.mll" ( CHAR{i=info lexbuf; v= String.get (text lexbuf) 1} ) # 427 "lexer.ml" | 11 -> # 209 "lexer.mll" ( CHAR{i=info lexbuf; v= '\000'} ) # 432 "lexer.ml" | 12 -> # 213 "lexer.mll" ( createID (info lexbuf) (text lexbuf) ) # 437 "lexer.ml" | 13 -> # 227 "lexer.mll" ( createID (info lexbuf) (text lexbuf) ) # 442 "lexer.ml" | 14 -> # 229 "lexer.mll" ( resetStr(); startLex := info lexbuf; string lexbuf ) # 447 "lexer.ml" | 15 -> # 231 "lexer.mll" ( EOF(info lexbuf) ) # 452 "lexer.ml" | 16 -> # 233 "lexer.mll" ( error (info lexbuf) "Illegal character" ) # 457 "lexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_main_rec lexbuf __ocaml_lex_state and comment lexbuf = __ocaml_lex_comment_rec lexbuf 44 and __ocaml_lex_comment_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 237 "lexer.mll" ( depth := succ !depth; comment lexbuf ) # 468 "lexer.ml" | 1 -> # 239 "lexer.mll" ( depth := pred !depth; if !depth > 0 then comment lexbuf ) # 473 "lexer.ml" | 2 -> # 241 "lexer.mll" ( error (!startLex) "Comment not terminated" ) # 478 "lexer.ml" | 3 -> # 243 "lexer.mll" ( comment lexbuf ) # 483 "lexer.ml" | 4 -> # 245 "lexer.mll" ( newline lexbuf; comment lexbuf ) # 488 "lexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_comment_rec lexbuf __ocaml_lex_state and cpp_comment lexbuf = __ocaml_lex_cpp_comment_rec lexbuf 48 and __ocaml_lex_cpp_comment_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 249 "lexer.mll" ( cpp_comment lexbuf ) # 499 "lexer.ml" | 1 -> # 251 "lexer.mll" ( newline lexbuf ) # 504 "lexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_cpp_comment_rec lexbuf __ocaml_lex_state and getFile lexbuf = __ocaml_lex_getFile_rec lexbuf 49 and __ocaml_lex_getFile_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 254 "lexer.mll" ( getName lexbuf ) # 515 "lexer.ml" | 1 -> # 255 "lexer.mll" ( main lexbuf ) # 520 "lexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_getFile_rec lexbuf __ocaml_lex_state and getName lexbuf = __ocaml_lex_getName_rec lexbuf 51 and __ocaml_lex_getName_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 258 "lexer.mll" ( filename := (text lexbuf); finishName lexbuf ) # 531 "lexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_getName_rec lexbuf __ocaml_lex_state and finishName lexbuf = __ocaml_lex_finishName_rec lexbuf 53 and __ocaml_lex_finishName_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 261 "lexer.mll" ( main lexbuf ) # 542 "lexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_finishName_rec lexbuf __ocaml_lex_state and string lexbuf = __ocaml_lex_string_rec lexbuf 55 and __ocaml_lex_string_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 264 "lexer.mll" ( STRING {i = !startLex; v=getStr()} ) # 553 "lexer.ml" | 1 -> # 265 "lexer.mll" ( addStr(escaped lexbuf); string lexbuf ) # 558 "lexer.ml" | 2 -> # 266 "lexer.mll" ( addStr '\n'; newline lexbuf; string lexbuf ) # 563 "lexer.ml" | 3 -> # 267 "lexer.mll" ( error (!startLex) "String not terminated" ) # 568 "lexer.ml" | 4 -> # 268 "lexer.mll" ( addStr (Lexing.lexeme_char lexbuf 0); string lexbuf ) # 573 "lexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_string_rec lexbuf __ocaml_lex_state and escaped lexbuf = __ocaml_lex_escaped_rec lexbuf 56 and __ocaml_lex_escaped_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 271 "lexer.mll" ( '\n' ) # 584 "lexer.ml" | 1 -> # 272 "lexer.mll" ( '\t' ) # 589 "lexer.ml" | 2 -> # 273 "lexer.mll" ( '\\' ) # 594 "lexer.ml" | 3 -> # 274 "lexer.mll" ( '\034' ) # 599 "lexer.ml" | 4 -> # 275 "lexer.mll" ( '\'' ) # 604 "lexer.ml" | 5 -> # 277 "lexer.mll" ( let x = int_of_string(text lexbuf) in if x > 255 then error (info lexbuf) "Illegal character constant" else Char.chr x ) # 615 "lexer.ml" | 6 -> # 285 "lexer.mll" ( error (info lexbuf) "Illegal character constant" ) # 620 "lexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_escaped_rec lexbuf __ocaml_lex_state ;;