# 10 "lexer.mll" open Parser let debug msg = print_string msg; print_newline() let debug msg = () # 10 "lexer.ml" let __ocaml_lex_tables = { Lexing.lex_base = "\000\000\234\255\078\000\235\255\236\255\007\000\003\000\155\000\ \240\255\241\255\242\255\243\255\244\255\245\255\246\255\247\255\ \248\255\249\255\250\255\251\255\216\000\253\255\254\255\001\000\ \006\000\035\001\110\001\185\001\004\002\165\000\175\000\238\255\ \237\255"; Lexing.lex_backtrk = "\255\255\255\255\021\000\255\255\255\255\255\255\255\255\016\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\021\000\255\255\255\255\000\000\ \000\000\021\000\021\000\021\000\003\000\255\255\016\000\255\255\ \255\255"; Lexing.lex_default = "\255\255\000\000\255\255\000\000\000\000\005\000\006\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\255\255\000\000\000\000\023\000\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\000\000\ \000\000"; Lexing.lex_trans = "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\024\000\024\000\255\255\000\000\000\000\000\000\024\000\ \024\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \024\000\000\000\006\000\023\000\004\000\031\000\024\000\005\000\ \011\000\010\000\013\000\015\000\016\000\014\000\032\000\012\000\ \007\000\007\000\007\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\000\000\021\000\000\000\017\000\000\000\001\000\ \003\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\009\000\000\000\008\000\000\000\002\000\ \000\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\020\000\ \002\000\002\000\002\000\019\000\000\000\018\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\000\000\000\000\000\000\000\000\002\000\000\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\029\000\000\000\007\000\007\000\007\000\007\000\007\000\ \007\000\007\000\007\000\007\000\007\000\030\000\030\000\030\000\ \030\000\030\000\030\000\030\000\030\000\030\000\030\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\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \022\000\255\255\000\000\255\255\000\000\000\000\000\000\255\255\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\000\000\000\000\000\000\000\000\002\000\ \000\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \025\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\000\000\000\000\ \000\000\000\000\002\000\000\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\026\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\000\000\000\000\000\000\000\000\002\000\000\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\027\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\000\000\000\000\000\000\000\000\ \002\000\000\000\002\000\002\000\002\000\002\000\028\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\000\000\ \000\000\000\000\000\000\002\000\000\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\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\023\000\255\255\255\255\255\255\024\000\ \024\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\255\255\000\000\000\000\000\000\006\000\024\000\000\000\ \000\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\255\255\000\000\255\255\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\255\255\000\000\255\255\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\255\255\000\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\255\255\255\255\255\255\255\255\002\000\255\255\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\000\002\000\002\000\002\000\002\000\002\000\002\000\002\000\ \002\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\029\000\029\000\029\000\ \029\000\029\000\029\000\029\000\029\000\029\000\029\000\030\000\ \030\000\030\000\030\000\030\000\030\000\030\000\030\000\030\000\ \030\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\ \000\000\023\000\255\255\006\000\255\255\255\255\255\255\005\000\ \020\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\ \020\000\020\000\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\020\000\020\000\020\000\020\000\020\000\020\000\020\000\ \020\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\ \020\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\ \020\000\020\000\020\000\255\255\255\255\255\255\255\255\020\000\ \255\255\020\000\020\000\020\000\020\000\020\000\020\000\020\000\ \020\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\ \020\000\020\000\020\000\020\000\020\000\020\000\020\000\020\000\ \020\000\020\000\020\000\025\000\025\000\025\000\025\000\025\000\ \025\000\025\000\025\000\025\000\025\000\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\025\000\025\000\025\000\025\000\ \025\000\025\000\025\000\025\000\025\000\025\000\025\000\025\000\ \025\000\025\000\025\000\025\000\025\000\025\000\025\000\025\000\ \025\000\025\000\025\000\025\000\025\000\025\000\255\255\255\255\ \255\255\255\255\025\000\255\255\025\000\025\000\025\000\025\000\ \025\000\025\000\025\000\025\000\025\000\025\000\025\000\025\000\ \025\000\025\000\025\000\025\000\025\000\025\000\025\000\025\000\ \025\000\025\000\025\000\025\000\025\000\025\000\026\000\026\000\ \026\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\026\000\ \026\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\ \026\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\ \026\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\ \026\000\255\255\255\255\255\255\255\255\026\000\255\255\026\000\ \026\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\ \026\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\ \026\000\026\000\026\000\026\000\026\000\026\000\026\000\026\000\ \026\000\027\000\027\000\027\000\027\000\027\000\027\000\027\000\ \027\000\027\000\027\000\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\027\000\027\000\027\000\027\000\027\000\027\000\ \027\000\027\000\027\000\027\000\027\000\027\000\027\000\027\000\ \027\000\027\000\027\000\027\000\027\000\027\000\027\000\027\000\ \027\000\027\000\027\000\027\000\255\255\255\255\255\255\255\255\ \027\000\255\255\027\000\027\000\027\000\027\000\027\000\027\000\ \027\000\027\000\027\000\027\000\027\000\027\000\027\000\027\000\ \027\000\027\000\027\000\027\000\027\000\027\000\027\000\027\000\ \027\000\027\000\027\000\027\000\028\000\028\000\028\000\028\000\ \028\000\028\000\028\000\028\000\028\000\028\000\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\028\000\028\000\028\000\ \028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\ \028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\ \028\000\028\000\028\000\028\000\028\000\028\000\028\000\255\255\ \255\255\255\255\255\255\028\000\255\255\028\000\028\000\028\000\ \028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\ \028\000\028\000\028\000\028\000\028\000\028\000\028\000\028\000\ \028\000\028\000\028\000\028\000\028\000\028\000\028\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"; 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 token lexbuf = __ocaml_lex_token_rec lexbuf 0 and __ocaml_lex_token_rec lexbuf __ocaml_lex_state = match Lexing.engine __ocaml_lex_tables __ocaml_lex_state lexbuf with | 0 -> # 21 "lexer.mll" ( token lexbuf ) # 247 "lexer.ml" | 1 -> # 25 "lexer.mll" ( EOF ) # 252 "lexer.ml" | 2 -> # 26 "lexer.mll" ( debug "semi" ; SEMI ) # 257 "lexer.ml" | 3 -> # 30 "lexer.mll" ( debug "while" ; WHILE ) # 262 "lexer.ml" | 4 -> # 31 "lexer.mll" ( debug "left curley" ; LEFT_CURLEY ) # 267 "lexer.ml" | 5 -> # 32 "lexer.mll" ( debug "right curley" ; RIGHT_CURLEY ) # 272 "lexer.ml" | 6 -> # 43 "lexer.mll" ( BINARY_OP("=") ) # 277 "lexer.ml" | 7 -> # 44 "lexer.mll" ( BINARY_OP(",") ) # 282 "lexer.ml" | 8 -> # 45 "lexer.mll" ( BINARY_OP("+") ) # 287 "lexer.ml" | 9 -> # 46 "lexer.mll" ( BINARY_OP("-") ) # 292 "lexer.ml" | 10 -> # 47 "lexer.mll" ( BINARY_OP("*") ) # 297 "lexer.ml" | 11 -> # 48 "lexer.mll" ( BINARY_OP("/") ) # 302 "lexer.ml" | 12 -> # 59 "lexer.mll" ( LEFT_PAREN ) # 307 "lexer.ml" | 13 -> # 60 "lexer.mll" ( RIGHT_PAREN ) # 312 "lexer.ml" | 14 -> # 61 "lexer.mll" ( LEFT_BRACKET ) # 317 "lexer.ml" | 15 -> # 62 "lexer.mll" ( RIGHT_BRACKET ) # 322 "lexer.ml" | 16 -> # 66 "lexer.mll" ( CONST(Lexing.lexeme lexbuf) ) # 327 "lexer.ml" | 17 -> # 68 "lexer.mll" ( let s = Lexing.lexeme lexbuf in let substr = String.sub s 1 ((String.length s) - 2) in CONST(substr) ) # 336 "lexer.ml" | 18 -> # 74 "lexer.mll" ( let s = Lexing.lexeme lexbuf in let substr = String.sub s 1 ((String.length s) - 2) in CONST(substr) ) # 345 "lexer.ml" | 19 -> # 81 "lexer.mll" ( SCALAR ) # 350 "lexer.ml" | 20 -> # 82 "lexer.mll" ( LIST ) # 355 "lexer.ml" | 21 -> # 86 "lexer.mll" ( IDENT(Lexing.lexeme lexbuf) ) # 360 "lexer.ml" | __ocaml_lex_state -> lexbuf.Lexing.refill_buff lexbuf; __ocaml_lex_token_rec lexbuf __ocaml_lex_state ;;