# 9 "lexer.mll" open Support.Error let reservedWords = [ (* Keywords *) ("if", fun i -> Parser.IF i); ("then", fun i -> Parser.THEN i); ("else", fun i -> Parser.ELSE i); ("true", fun i -> Parser.TRUE i); ("false", fun i -> Parser.FALSE i); ("succ", fun i -> Parser.SUCC i); ("pred", fun i -> Parser.PRED i); ("iszero", fun i -> Parser.ISZERO i); (* Symbols *) ("_", fun i -> Parser.USCORE i); ("'", fun i -> Parser.APOSTROPHE i); ("\"", fun i -> Parser.DQUOTE i); ("!", fun i -> Parser.BANG i); ("#", fun i -> Parser.HASH i); ("$", fun i -> Parser.TRIANGLE i); ("*", fun i -> Parser.STAR i); ("|", fun i -> Parser.VBAR i); (".", fun i -> Parser.DOT i); (";", fun i -> Parser.SEMI i); (",", fun i -> Parser.COMMA i); ("/", fun i -> Parser.SLASH i); (":", fun i -> Parser.COLON i); ("::", fun i -> Parser.COLONCOLON i); ("=", fun i -> Parser.EQ i); ("==", fun i -> Parser.EQEQ i); ("[", fun i -> Parser.LSQUARE i); ("<", fun i -> Parser.LT i); ("{", fun i -> Parser.LCURLY i); ("(", fun i -> Parser.LPAREN i); ("<-", fun i -> Parser.LEFTARROW i); ("{|", fun i -> Parser.LCURLYBAR i); ("[|", fun i -> Parser.LSQUAREBAR i); ("}", fun i -> Parser.RCURLY i); (")", fun i -> Parser.RPAREN i); ("]", fun i -> Parser.RSQUARE i); (">", fun i -> Parser.GT i); ("|}", fun i -> Parser.BARRCURLY i); ("|>", fun i -> Parser.BARGT i); ("|]", fun i -> Parser.BARRSQUARE i); (* Special compound symbols: *) (":=", fun i -> Parser.COLONEQ i); ("->", fun i -> Parser.ARROW i); ("=>", fun i -> Parser.DARROW i); ("==>", fun i -> Parser.DDARROW 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 _ -> if (String.get str 0) >= 'A' && (String.get str 0) <= 'Z' then Parser.UCID {i=i;v=str} else Parser.LCID {i=i;v=str} let lineno = ref 1 and depth = ref 0 and start = ref 0 and filename = ref "" and startLex = ref dummyinfo let create inFile stream = if not (Filename.is_implicit inFile) then filename := inFile else filename := Filename.concat (Sys.getcwd()) 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)) # 118 "lexer.ml" let __ocaml_lex_tables = { Lexing.lex_base = "\000\000\242\255\241\255\118\000\001\000\254\255\086\000\105\000\ \193\000\203\000\217\000\004\001\244\255\082\000\091\000\113\000\ \022\000\187\000\023\000\087\000\243\255\246\255\089\000\026\001\ \053\001\047\000\053\000\063\000\133\000\063\001\087\001\252\255\ \253\255\097\001\107\001\004\000\186\000\124\000\120\000\251\255\ \255\255\165\000\224\000\225\000\134\000\007\000\234\000\139\001\ \249\255\149\001\159\001\250\255"; Lexing.lex_backtrk = "\255\255\255\255\255\255\000\000\014\000\255\255\006\000\008\000\ \010\000\010\000\010\000\010\000\255\255\011\000\011\000\011\000\ \011\000\011\000\011\000\011\000\255\255\255\255\009\000\255\255\ \004\000\255\255\255\255\255\255\255\255\255\255\005\000\255\255\ \255\255\255\255\007\000\255\255\255\255\003\000\003\000\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 = "\002\000\000\000\000\000\255\255\255\255\000\000\255\255\255\255\ \255\255\255\255\255\255\255\255\000\000\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\000\000\000\000\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\000\000\ \000\000\255\255\255\255\255\255\031\000\255\255\255\255\000\000\ \000\000\255\255\043\000\043\000\255\255\045\000\039\000\048\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\003\000\005\000\005\000\003\000\004\000\005\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\ \003\000\012\000\020\000\015\000\008\000\008\000\008\000\012\000\ \012\000\012\000\013\000\008\000\012\000\010\000\012\000\014\000\ \006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\ \006\000\006\000\009\000\012\000\017\000\019\000\012\000\012\000\ \008\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\018\000\008\000\012\000\012\000\007\000\ \008\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\016\000\011\000\012\000\008\000\003\000\ \005\000\032\000\003\000\035\000\033\000\031\000\006\000\006\000\ \006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\ \007\000\023\000\021\000\021\000\022\000\021\000\003\000\021\000\ \026\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\027\000\028\000\029\000\040\000\005\000\ \045\000\000\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\039\000\041\000\000\000\040\000\ \007\000\000\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\038\000\008\000\008\000\008\000\ \021\000\037\000\255\255\255\255\008\000\000\000\008\000\008\000\ \008\000\008\000\000\000\000\000\032\000\021\000\008\000\000\000\ \008\000\000\000\000\000\008\000\000\000\008\000\008\000\008\000\ \001\000\008\000\255\255\255\255\008\000\008\000\008\000\255\255\ \021\000\000\000\000\000\008\000\040\000\000\000\000\000\000\000\ \000\000\000\000\000\000\008\000\000\000\000\000\000\000\021\000\ \000\000\008\000\000\000\000\000\000\000\008\000\000\000\000\000\ \000\000\008\000\000\000\000\000\000\000\000\000\000\000\008\000\ \008\000\008\000\008\000\008\000\000\000\000\000\000\000\008\000\ \000\000\008\000\000\000\000\000\000\000\008\000\000\000\021\000\ \000\000\008\000\000\000\000\000\000\000\008\000\008\000\008\000\ \000\000\000\000\021\000\000\000\008\000\000\000\005\000\008\000\ \000\000\008\000\024\000\024\000\024\000\024\000\024\000\024\000\ \024\000\024\000\024\000\024\000\000\000\008\000\000\000\008\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \008\000\021\000\000\000\000\000\008\000\024\000\024\000\024\000\ \024\000\024\000\024\000\024\000\024\000\024\000\024\000\030\000\ \030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ \030\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \008\000\021\000\008\000\000\000\000\000\000\000\025\000\030\000\ \030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ \030\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ \034\000\034\000\034\000\034\000\034\000\034\000\034\000\034\000\ \034\000\034\000\034\000\034\000\034\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\031\000\000\000\000\000\ \000\000\000\000\039\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\032\000\049\000\049\000\049\000\049\000\049\000\ \049\000\049\000\049\000\049\000\049\000\050\000\050\000\050\000\ \050\000\050\000\050\000\050\000\050\000\050\000\050\000\051\000\ \051\000\051\000\051\000\051\000\051\000\051\000\051\000\051\000\ \051\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \255\255\255\255\000\000\000\000\000\000\000\000\000\000\032\000\ \000\000\000\000\031\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\040\000\000\000\000\000\000\000\000\000\000\000\005\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\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\ "; 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\004\000\000\000\000\000\035\000\255\255\ \255\255\045\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\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\003\000\ \003\000\013\000\003\000\003\000\006\000\014\000\006\000\006\000\ \006\000\006\000\006\000\006\000\006\000\006\000\006\000\006\000\ \007\000\015\000\016\000\018\000\019\000\019\000\003\000\022\000\ \025\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\026\000\027\000\028\000\037\000\038\000\ \044\000\255\255\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\036\000\041\000\255\255\041\000\ \007\000\255\255\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\036\000\008\000\008\000\008\000\ \017\000\036\000\042\000\043\000\008\000\255\255\008\000\009\000\ \009\000\009\000\255\255\255\255\046\000\017\000\009\000\255\255\ \009\000\255\255\255\255\008\000\255\255\010\000\010\000\010\000\ \000\000\008\000\042\000\043\000\010\000\009\000\010\000\045\000\ \009\000\255\255\255\255\009\000\046\000\255\255\255\255\255\255\ \255\255\255\255\255\255\010\000\255\255\255\255\255\255\010\000\ \255\255\010\000\255\255\255\255\255\255\008\000\255\255\255\255\ \255\255\008\000\255\255\255\255\255\255\255\255\255\255\009\000\ \011\000\011\000\011\000\009\000\255\255\255\255\255\255\011\000\ \255\255\011\000\255\255\255\255\255\255\010\000\255\255\017\000\ \255\255\010\000\255\255\255\255\255\255\008\000\011\000\008\000\ \255\255\255\255\011\000\255\255\011\000\255\255\046\000\009\000\ \255\255\009\000\023\000\023\000\023\000\023\000\023\000\023\000\ \023\000\023\000\023\000\023\000\255\255\010\000\255\255\010\000\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \011\000\011\000\255\255\255\255\011\000\024\000\024\000\024\000\ \024\000\024\000\024\000\024\000\024\000\024\000\024\000\029\000\ \029\000\029\000\029\000\029\000\029\000\029\000\029\000\029\000\ \029\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \011\000\011\000\011\000\255\255\255\255\255\255\023\000\030\000\ \030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ \030\000\033\000\033\000\033\000\033\000\033\000\033\000\033\000\ \033\000\033\000\033\000\034\000\034\000\034\000\034\000\034\000\ \034\000\034\000\034\000\034\000\034\000\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\047\000\255\255\255\255\ \255\255\255\255\047\000\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\036\000\047\000\047\000\047\000\047\000\047\000\ \047\000\047\000\047\000\047\000\047\000\049\000\049\000\049\000\ \049\000\049\000\049\000\049\000\049\000\049\000\049\000\050\000\ \050\000\050\000\050\000\050\000\050\000\050\000\050\000\050\000\ \050\000\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \042\000\043\000\255\255\255\255\255\255\255\255\255\255\047\000\ \255\255\255\255\046\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\047\000\255\255\255\255\255\255\255\255\255\255\047\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\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\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\047\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\ "; 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 -> # 129 "lexer.mll" ( main lexbuf ) # 337 "lexer.ml" | 1 -> # 131 "lexer.mll" ( newline lexbuf; main lexbuf ) # 342 "lexer.ml" | 2 -> # 133 "lexer.mll" ( error (info lexbuf) "Unmatched end of comment" ) # 347 "lexer.ml" | 3 -> # 135 "lexer.mll" ( depth := 1; startLex := info lexbuf; comment lexbuf; main lexbuf ) # 352 "lexer.ml" | 4 -> # 138 "lexer.mll" ( lineno := extractLineno (text lexbuf) 2 - 1; getFile lexbuf ) # 357 "lexer.ml" | 5 -> # 141 "lexer.mll" ( lineno := extractLineno (text lexbuf) 7 - 1; getFile lexbuf ) # 362 "lexer.ml" | 6 -> # 144 "lexer.mll" ( Parser.INTV{i=info lexbuf; v=int_of_string (text lexbuf)} ) # 367 "lexer.ml" | 7 -> # 147 "lexer.mll" ( Parser.FLOATV{i=info lexbuf; v=float_of_string (text lexbuf)} ) # 372 "lexer.ml" | 8 -> # 151 "lexer.mll" ( createID (info lexbuf) (text lexbuf) ) # 377 "lexer.ml" | 9 -> # 155 "lexer.mll" ( createID (info lexbuf) (text lexbuf) ) # 382 "lexer.ml" | 10 -> # 158 "lexer.mll" ( createID (info lexbuf) (text lexbuf) ) # 387 "lexer.ml" | 11 -> # 162 "lexer.mll" ( createID (info lexbuf) (text lexbuf) ) # 392 "lexer.ml" | 12 -> # 164 "lexer.mll" ( resetStr(); startLex := info lexbuf; string lexbuf ) # 397 "lexer.ml" | 13 -> # 166 "lexer.mll" ( Parser.EOF(info lexbuf) ) # 402 "lexer.ml" | 14 -> # 168 "lexer.mll" ( error (info lexbuf) "Illegal character" ) # 407 "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 36 and __ocaml_lex_comment_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 172 "lexer.mll" ( depth := succ !depth; comment lexbuf ) # 418 "lexer.ml" | 1 -> # 174 "lexer.mll" ( depth := pred !depth; if !depth > 0 then comment lexbuf ) # 423 "lexer.ml" | 2 -> # 176 "lexer.mll" ( error (!startLex) "Comment not terminated" ) # 428 "lexer.ml" | 3 -> # 178 "lexer.mll" ( comment lexbuf ) # 433 "lexer.ml" | 4 -> # 180 "lexer.mll" ( newline lexbuf; comment lexbuf ) # 438 "lexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_comment_rec lexbuf __ocaml_lex_state and getFile lexbuf = __ocaml_lex_getFile_rec lexbuf 41 and __ocaml_lex_getFile_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 183 "lexer.mll" ( getName lexbuf ) # 449 "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 42 and __ocaml_lex_getName_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 186 "lexer.mll" ( filename := (text lexbuf); finishName lexbuf ) # 460 "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 44 and __ocaml_lex_finishName_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 189 "lexer.mll" ( main lexbuf ) # 471 "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 46 and __ocaml_lex_string_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 192 "lexer.mll" ( Parser.STRINGV {i = !startLex; v=getStr()} ) # 482 "lexer.ml" | 1 -> # 193 "lexer.mll" ( addStr(escaped lexbuf); string lexbuf ) # 487 "lexer.ml" | 2 -> # 194 "lexer.mll" ( addStr '\n'; newline lexbuf; string lexbuf ) # 492 "lexer.ml" | 3 -> # 195 "lexer.mll" ( error (!startLex) "String not terminated" ) # 497 "lexer.ml" | 4 -> # 196 "lexer.mll" ( addStr (Lexing.lexeme_char lexbuf 0); string lexbuf ) # 502 "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 47 and __ocaml_lex_escaped_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 199 "lexer.mll" ( '\n' ) # 513 "lexer.ml" | 1 -> # 200 "lexer.mll" ( '\t' ) # 518 "lexer.ml" | 2 -> # 201 "lexer.mll" ( '\\' ) # 523 "lexer.ml" | 3 -> # 202 "lexer.mll" ( '\034' ) # 528 "lexer.ml" | 4 -> # 203 "lexer.mll" ( '\'' ) # 533 "lexer.ml" | 5 -> # 205 "lexer.mll" ( let x = int_of_string(text lexbuf) in if x > 255 then error (info lexbuf) "Illegal character constant" else Char.chr x ) # 544 "lexer.ml" | 6 -> # 213 "lexer.mll" ( error (info lexbuf) "Illegal character constant" ) # 549 "lexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_escaped_rec lexbuf __ocaml_lex_state ;;