type token = | Space | Token | Type | Lname of (string) | Uname of (string) | Separator | Lparen | Rparen | Comma | Colon | Code of (string * int * int) | Error | Alt | Loop_plus | Loop_star | Dollar | Lbracket | Rbracket | Eof open Parsing;; # 7 "parser.mly" open Ast # 27 "parser.ml" let yytransl_const = [| 257 (* Space *); 258 (* Token *); 259 (* Type *); 262 (* Separator *); 263 (* Lparen *); 264 (* Rparen *); 265 (* Comma *); 266 (* Colon *); 268 (* Error *); 269 (* Alt *); 270 (* Loop_plus *); 271 (* Loop_star *); 272 (* Dollar *); 273 (* Lbracket *); 274 (* Rbracket *); 275 (* Eof *); 0|] let yytransl_block = [| 260 (* Lname *); 261 (* Uname *); 267 (* Code *); 0|] let yylhs = "\255\255\ \001\000\002\000\002\000\004\000\004\000\003\000\003\000\005\000\ \006\000\006\000\008\000\008\000\007\000\010\000\010\000\009\000\ \009\000\011\000\011\000\013\000\013\000\015\000\015\000\015\000\ \012\000\012\000\012\000\012\000\012\000\012\000\016\000\016\000\ \017\000\017\000\014\000\014\000\000\000" let yylen = "\002\000\ \002\000\002\000\001\000\002\000\003\000\002\000\001\000\005\000\ \001\000\002\000\003\000\001\000\002\000\003\000\000\000\001\000\ \003\000\006\000\004\000\002\000\000\000\002\000\002\000\001\000\ \003\000\005\000\007\000\001\000\003\000\005\000\001\000\002\000\ \001\000\003\000\002\000\000\000\002\000" let yydefred = "\000\000\ \000\000\000\000\000\000\003\000\037\000\000\000\000\000\000\000\ \004\000\000\000\007\000\001\000\000\000\002\000\005\000\000\000\ \006\000\000\000\009\000\000\000\012\000\000\000\010\000\000\000\ \000\000\000\000\028\000\000\000\000\000\008\000\000\000\016\000\ \000\000\011\000\000\000\000\000\000\000\000\000\000\000\013\000\ \000\000\000\000\000\000\000\000\000\000\031\000\029\000\000\000\ \025\000\000\000\017\000\000\000\000\000\000\000\023\000\022\000\ \000\000\020\000\033\000\000\000\032\000\000\000\000\000\000\000\ \014\000\000\000\000\000\019\000\000\000\026\000\000\000\030\000\ \000\000\035\000\034\000\000\000\018\000\027\000" let yydgoto = "\002\000\ \005\000\006\000\012\000\007\000\013\000\020\000\030\000\023\000\ \031\000\040\000\032\000\033\000\043\000\068\000\044\000\047\000\ \061\000" let yysindex = "\007\000\ \026\255\000\000\040\255\000\000\000\000\042\255\026\255\033\255\ \000\000\023\255\000\000\000\000\042\255\000\000\000\000\025\255\ \000\000\044\255\000\000\032\255\000\000\035\255\000\000\000\255\ \044\255\030\255\000\000\039\255\047\255\000\000\045\255\000\000\ \002\255\000\000\027\255\005\255\019\255\038\255\000\255\000\000\ \048\255\029\255\049\255\019\255\046\255\000\000\000\000\050\255\ \000\000\057\255\000\000\055\255\045\255\019\255\000\000\000\000\ \051\255\000\000\000\000\060\255\000\000\027\255\052\255\027\255\ \000\000\054\255\056\255\000\000\046\255\000\000\059\255\000\000\ \051\255\000\000\000\000\027\255\000\000\000\000" let yyrindex = "\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\043\255\000\000\ \058\255\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\009\255\000\000\058\255\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\043\255\058\255\000\000\000\000\ \021\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\ \021\255\000\000\000\000\000\000\000\000\000\000" let yygindex = "\000\000\ \000\000\061\000\058\000\000\000\000\000\000\000\000\000\047\000\ \034\000\021\000\038\000\223\255\214\255\003\000\000\000\195\255\ \008\000" let yytablesize = 77 let yytable = "\042\000\ \070\000\058\000\072\000\026\000\027\000\026\000\027\000\001\000\ \048\000\049\000\042\000\066\000\024\000\024\000\078\000\028\000\ \029\000\041\000\029\000\024\000\042\000\050\000\026\000\027\000\ \036\000\024\000\036\000\003\000\018\000\016\000\045\000\004\000\ \019\000\036\000\046\000\029\000\035\000\015\000\025\000\036\000\ \055\000\024\000\008\000\056\000\009\000\010\000\015\000\011\000\ \015\000\037\000\038\000\021\000\022\000\059\000\060\000\052\000\ \062\000\039\000\054\000\057\000\063\000\064\000\067\000\069\000\ \073\000\076\000\074\000\014\000\021\000\071\000\017\000\034\000\ \053\000\065\000\051\000\077\000\075\000" let yycheck = "\033\000\ \062\000\044\000\064\000\004\001\005\001\004\001\005\001\001\000\ \004\001\005\001\044\000\054\000\004\001\005\001\076\000\016\001\ \017\001\016\001\017\001\011\001\054\000\017\001\004\001\005\001\ \004\001\017\001\006\001\002\001\004\001\007\001\004\001\006\001\ \008\001\013\001\008\001\017\001\007\001\005\001\004\001\010\001\ \012\001\010\001\003\001\015\001\005\001\004\001\004\001\006\001\ \006\001\011\001\004\001\008\001\009\001\008\001\009\001\018\001\ \007\001\013\001\011\001\011\001\004\001\007\001\012\001\004\001\ \011\001\007\001\011\001\007\000\011\001\018\001\013\000\025\000\ \039\000\053\000\037\000\073\000\069\000" let yynames_const = "\ Space\000\ Token\000\ Type\000\ Separator\000\ Lparen\000\ Rparen\000\ Comma\000\ Colon\000\ Error\000\ Alt\000\ Loop_plus\000\ Loop_star\000\ Dollar\000\ Lbracket\000\ Rbracket\000\ Eof\000\ " let yynames_block = "\ Lname\000\ Uname\000\ Code\000\ " let yyact = [| (fun _ -> failwith "parser") ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'declarations) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'rules) in Obj.repr( # 37 "parser.mly" ( { text_decls = _1; text_rules = _2; } ) # 171 "parser.ml" : Ast.text)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'declaration) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'declarations) in Obj.repr( # 41 "parser.mly" ( _1 :: _2 ) # 179 "parser.ml" : 'declarations)) ; (fun __caml_parser_env -> Obj.repr( # 43 "parser.mly" ( [] ) # 185 "parser.ml" : 'declarations)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 0 : string) in Obj.repr( # 47 "parser.mly" ( D_token _2 ) # 192 "parser.ml" : 'declaration)) ; (fun __caml_parser_env -> let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in Obj.repr( # 49 "parser.mly" ( D_typed_token _3 ) # 199 "parser.ml" : 'declaration)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'rule) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'rules) in Obj.repr( # 53 "parser.mly" ( _1 :: _2 ) # 207 "parser.ml" : 'rules)) ; (fun __caml_parser_env -> Obj.repr( # 55 "parser.mly" ( [] ) # 213 "parser.ml" : 'rules)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 4 : string) in let _3 = (Parsing.peek_val __caml_parser_env 2 : 'formal_arguments) in let _5 = (Parsing.peek_val __caml_parser_env 0 : 'branches) in Obj.repr( # 59 "parser.mly" ( { rule_name = _1; rule_arguments = _3; rule_branches = _5; } ) # 226 "parser.ml" : 'rule)) ; (fun __caml_parser_env -> Obj.repr( # 67 "parser.mly" ( [] ) # 232 "parser.ml" : 'formal_arguments)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'comma_formal_arguments) in Obj.repr( # 69 "parser.mly" ( _1 :: _2 ) # 240 "parser.ml" : 'formal_arguments)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'comma_formal_arguments) in Obj.repr( # 73 "parser.mly" ( _2 :: _3 ) # 248 "parser.ml" : 'comma_formal_arguments)) ; (fun __caml_parser_env -> Obj.repr( # 75 "parser.mly" ( [] ) # 254 "parser.ml" : 'comma_formal_arguments)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'branch) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'alt_branches) in Obj.repr( # 79 "parser.mly" ( _1 :: _2 ) # 262 "parser.ml" : 'branches)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 1 : 'branch) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'alt_branches) in Obj.repr( # 83 "parser.mly" ( _2 :: _3 ) # 270 "parser.ml" : 'alt_branches)) ; (fun __caml_parser_env -> Obj.repr( # 85 "parser.mly" ( [] ) # 276 "parser.ml" : 'alt_branches)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'simple_branch) in Obj.repr( # 89 "parser.mly" ( _1 ) # 283 "parser.ml" : 'branch)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 1 : string * int * int) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'simple_branch) in Obj.repr( # 91 "parser.mly" ( { _3 with branch_early_code = _2 } ) # 291 "parser.ml" : 'branch)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 5 : 'symbol) in let _3 = (Parsing.peek_val __caml_parser_env 3 : string * int * int) in let _4 = (Parsing.peek_val __caml_parser_env 2 : 'patterns) in let _5 = (Parsing.peek_val __caml_parser_env 1 : string * int * int) in let _6 = (Parsing.peek_val __caml_parser_env 0 : 'opt_error_handler) in Obj.repr( # 95 "parser.mly" ( { branch_selector = _1; branch_early_code = ("",0,0); branch_binding_code = _3; branch_pattern = _4; branch_result_code = _5; branch_error_code = _6; } ) # 309 "parser.ml" : 'simple_branch)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 3 : 'symbol) in let _2 = (Parsing.peek_val __caml_parser_env 2 : 'patterns) in let _3 = (Parsing.peek_val __caml_parser_env 1 : string * int * int) in let _4 = (Parsing.peek_val __caml_parser_env 0 : 'opt_error_handler) in Obj.repr( # 104 "parser.mly" ( { branch_selector = _1; branch_early_code = ("",0,0); branch_binding_code = ("", 0, 0); branch_pattern = _2; branch_result_code = _3; branch_error_code = _4; } ) # 326 "parser.ml" : 'simple_branch)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'pattern) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'patterns) in Obj.repr( # 115 "parser.mly" ( _1 :: _2 ) # 334 "parser.ml" : 'patterns)) ; (fun __caml_parser_env -> Obj.repr( # 117 "parser.mly" ( [] ) # 340 "parser.ml" : 'patterns)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'symbol) in Obj.repr( # 121 "parser.mly" ( { pat_symbol = _1; pat_modifier = Repetition; } ) # 350 "parser.ml" : 'pattern)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'symbol) in Obj.repr( # 126 "parser.mly" ( { pat_symbol = _1; pat_modifier = Option; } ) # 360 "parser.ml" : 'pattern)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'symbol) in Obj.repr( # 131 "parser.mly" ( { pat_symbol = _1; pat_modifier = Exact; } ) # 370 "parser.ml" : 'pattern)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in let _3 = (Parsing.peek_val __caml_parser_env 0 : string) in Obj.repr( # 138 "parser.mly" ( U_symbol(_3, Some _1) ) # 378 "parser.ml" : 'symbol)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 4 : string) in let _3 = (Parsing.peek_val __caml_parser_env 2 : string) in let _5 = (Parsing.peek_val __caml_parser_env 0 : 'actual_arguments) in Obj.repr( # 140 "parser.mly" ( L_symbol(_3, _5, Some _1) ) # 387 "parser.ml" : 'symbol)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 6 : string) in let _4 = (Parsing.peek_val __caml_parser_env 3 : string) in let _7 = (Parsing.peek_val __caml_parser_env 0 : 'actual_arguments) in Obj.repr( # 142 "parser.mly" ( L_indirect(_4, _7, Some _1) ) # 396 "parser.ml" : 'symbol)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in Obj.repr( # 144 "parser.mly" ( U_symbol(_1, None) ) # 403 "parser.ml" : 'symbol)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'actual_arguments) in Obj.repr( # 146 "parser.mly" ( L_symbol(_1, _3, None) ) # 411 "parser.ml" : 'symbol)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 3 : string) in let _5 = (Parsing.peek_val __caml_parser_env 0 : 'actual_arguments) in Obj.repr( # 148 "parser.mly" ( L_indirect(_2, _5, None) ) # 419 "parser.ml" : 'symbol)) ; (fun __caml_parser_env -> Obj.repr( # 153 "parser.mly" ( [] ) # 425 "parser.ml" : 'actual_arguments)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'comma_actual_arguments) in Obj.repr( # 155 "parser.mly" ( _1 :: _2 ) # 433 "parser.ml" : 'actual_arguments)) ; (fun __caml_parser_env -> Obj.repr( # 159 "parser.mly" ( [] ) # 439 "parser.ml" : 'comma_actual_arguments)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 1 : string) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'comma_actual_arguments) in Obj.repr( # 161 "parser.mly" ( _2 :: _3 ) # 447 "parser.ml" : 'comma_actual_arguments)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 0 : string * int * int) in Obj.repr( # 165 "parser.mly" ( Some _2 ) # 454 "parser.ml" : 'opt_error_handler)) ; (fun __caml_parser_env -> Obj.repr( # 167 "parser.mly" ( None ) # 460 "parser.ml" : 'opt_error_handler)) (* Entry text *) ; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0))) |] let yytables = { Parsing.actions=yyact; Parsing.transl_const=yytransl_const; Parsing.transl_block=yytransl_block; Parsing.lhs=yylhs; Parsing.len=yylen; Parsing.defred=yydefred; Parsing.dgoto=yydgoto; Parsing.sindex=yysindex; Parsing.rindex=yyrindex; Parsing.gindex=yygindex; Parsing.tablesize=yytablesize; Parsing.table=yytable; Parsing.check=yycheck; Parsing.error_function=parse_error; Parsing.names_const=yynames_const; Parsing.names_block=yynames_block } let text (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = (Parsing.yyparse yytables 1 lexfun lexbuf : Ast.text) ;; # 170 "parser.mly" # 487 "parser.ml"