type token = | Ttoken | Tstart | Ttype | Tleft | Tright | Tnonassoc | Tprec | Terror | Tident of (Yacc_syntax.ident) | Taction of (Yacc_syntax.location) | Ttypedecl of (Yacc_syntax.location) | Tor | Tsemicolon | Tcolon | Tmark | EOF open Parsing;; # 22 "yacc_parser.mly" open Lex_syntax open Yacc_syntax let dummy_loc = { start_pos = 0 ; end_pos = 0 ; start_line = 0 ; start_col = 0 } # 32 "yacc_parser.ml" let yytransl_const = [| 257 (* Ttoken *); 258 (* Tstart *); 259 (* Ttype *); 260 (* Tleft *); 261 (* Tright *); 262 (* Tnonassoc *); 263 (* Tprec *); 264 (* Terror *); 268 (* Tor *); 269 (* Tsemicolon *); 270 (* Tcolon *); 271 (* Tmark *); 0 (* EOF *); 0|] let yytransl_block = [| 265 (* Tident *); 266 (* Taction *); 267 (* Ttypedecl *); 0|] let yylhs = "\255\255\ \001\000\002\000\002\000\003\000\003\000\005\000\005\000\005\000\ \005\000\005\000\005\000\005\000\006\000\006\000\004\000\004\000\ \007\000\007\000\008\000\008\000\009\000\009\000\010\000\010\000\ \010\000\010\000\000\000" let yylen = "\002\000\ \006\000\001\000\000\000\002\000\000\000\003\000\002\000\003\000\ \002\000\002\000\002\000\002\000\001\000\002\000\000\000\002\000\ \002\000\001\000\003\000\004\000\002\000\004\000\000\000\002\000\ \003\000\002\000\002\000" let yydefred = "\000\000\ \000\000\000\000\002\000\027\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\007\000\ \009\000\000\000\010\000\012\000\011\000\000\000\004\000\014\000\ \006\000\008\000\000\000\000\000\000\000\000\000\000\000\000\000\ \016\000\017\000\000\000\000\000\000\000\000\000\019\000\000\000\ \001\000\000\000\026\000\024\000\020\000\000\000\025\000\000\000\ \022\000" let yydgoto = "\002\000\ \004\000\005\000\012\000\028\000\013\000\016\000\029\000\030\000\ \039\000\040\000" let yysindex = "\017\000\ \250\254\000\000\000\000\000\000\037\255\247\254\010\255\033\255\ \010\255\010\255\010\255\007\255\037\255\010\255\010\255\000\000\ \000\000\010\255\000\000\000\000\000\000\039\255\000\000\000\000\ \000\000\000\000\035\255\250\254\039\255\040\255\038\255\051\000\ \000\000\000\000\043\255\026\255\026\255\026\255\000\000\044\255\ \000\000\026\255\000\000\000\000\000\000\045\255\000\000\026\255\ \000\000" let yyrindex = "\000\000\ \005\255\000\000\000\000\000\000\041\255\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\041\255\011\255\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\055\000\005\000\003\000\048\255\000\000\ \000\000\000\000\000\000\048\255\048\255\048\255\000\000\000\000\ \000\000\048\255\000\000\000\000\000\000\001\000\000\000\048\255\ \000\000" let yygindex = "\000\000\ \000\000\031\000\047\000\032\000\000\000\014\000\000\000\000\000\ \245\255\250\255" let yytablesize = 271 let yytable = "\014\000\ \021\000\015\000\018\000\003\000\015\000\003\000\003\000\003\000\ \003\000\003\000\003\000\013\000\013\000\013\000\013\000\013\000\ \013\000\001\000\014\000\003\000\017\000\022\000\019\000\020\000\ \021\000\013\000\045\000\024\000\025\000\043\000\044\000\026\000\ \035\000\036\000\037\000\047\000\049\000\006\000\007\000\008\000\ \009\000\010\000\011\000\018\000\035\000\036\000\037\000\027\000\ \031\000\038\000\041\000\042\000\034\000\046\000\003\000\005\000\ \048\000\023\000\032\000\023\000\033\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\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\000\021\000\018\000\018\000\021\000\015\000" let yycheck = "\009\001\ \000\000\011\001\000\000\010\001\000\000\001\001\002\001\003\001\ \004\001\005\001\006\001\001\001\002\001\003\001\004\001\005\001\ \006\001\001\000\009\001\015\001\007\000\015\001\009\000\010\000\ \011\000\015\001\038\000\014\000\015\000\036\000\037\000\018\000\ \007\001\008\001\009\001\042\000\048\000\001\001\002\001\003\001\ \004\001\005\001\006\001\011\001\007\001\008\001\009\001\009\001\ \014\001\012\001\000\000\009\001\013\001\010\001\000\000\015\001\ \012\001\010\001\028\000\013\000\029\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\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\009\001\010\001\009\001\010\001\013\001\010\001" let yynames_const = "\ Ttoken\000\ Tstart\000\ Ttype\000\ Tleft\000\ Tright\000\ Tnonassoc\000\ Tprec\000\ Terror\000\ Tor\000\ Tsemicolon\000\ Tcolon\000\ Tmark\000\ EOF\000\ " let yynames_block = "\ Tident\000\ Taction\000\ Ttypedecl\000\ " let yyact = [| (fun _ -> failwith "parser") ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 5 : 'header) in let _2 = (Parsing.peek_val __caml_parser_env 4 : 'tokendecls) in let _4 = (Parsing.peek_val __caml_parser_env 2 : 'rules) in let _5 = (Parsing.peek_val __caml_parser_env 1 : 'header) in Obj.repr( # 51 "yacc_parser.mly" ( { header = _1 ; decls = _2; rules = _4; trailer = _5 } ) # 210 "yacc_parser.ml" : Yacc_syntax.yacc_definitions)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : Yacc_syntax.location) in Obj.repr( # 59 "yacc_parser.mly" ( _1 ) # 217 "yacc_parser.ml" : 'header)) ; (fun __caml_parser_env -> Obj.repr( # 61 "yacc_parser.mly" ( dummy_loc ) # 223 "yacc_parser.ml" : 'header)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'tokendecl) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'tokendecls) in Obj.repr( # 68 "yacc_parser.mly" ( _1::_2 ) # 231 "yacc_parser.ml" : 'tokendecls)) ; (fun __caml_parser_env -> Obj.repr( # 70 "yacc_parser.mly" ( [] ) # 237 "yacc_parser.ml" : 'tokendecls)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 1 : Yacc_syntax.location) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'idlist) in Obj.repr( # 75 "yacc_parser.mly" ( Typed_tokens(_2,_3) ) # 245 "yacc_parser.ml" : 'tokendecl)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 0 : 'idlist) in Obj.repr( # 77 "yacc_parser.mly" ( Untyped_tokens(_2) ) # 252 "yacc_parser.ml" : 'tokendecl)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 1 : Yacc_syntax.location) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'idlist) in Obj.repr( # 79 "yacc_parser.mly" ( Non_terminals_type(_2,_3) ) # 260 "yacc_parser.ml" : 'tokendecl)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 0 : 'idlist) in Obj.repr( # 81 "yacc_parser.mly" ( Start_symbols(_2) ) # 267 "yacc_parser.ml" : 'tokendecl)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 0 : 'idlist) in Obj.repr( # 83 "yacc_parser.mly" ( Tokens_assoc(_2) ) # 274 "yacc_parser.ml" : 'tokendecl)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 0 : 'idlist) in Obj.repr( # 85 "yacc_parser.mly" ( Tokens_assoc(_2) ) # 281 "yacc_parser.ml" : 'tokendecl)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 0 : 'idlist) in Obj.repr( # 87 "yacc_parser.mly" ( Tokens_assoc(_2) ) # 288 "yacc_parser.ml" : 'tokendecl)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : Yacc_syntax.ident) in Obj.repr( # 92 "yacc_parser.mly" ( [_1] ) # 295 "yacc_parser.ml" : 'idlist)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : Yacc_syntax.ident) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'idlist) in Obj.repr( # 94 "yacc_parser.mly" ( _1 :: _2 ) # 303 "yacc_parser.ml" : 'idlist)) ; (fun __caml_parser_env -> Obj.repr( # 101 "yacc_parser.mly" ( [] ) # 309 "yacc_parser.ml" : 'rules)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'general_rule) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'rules) in Obj.repr( # 103 "yacc_parser.mly" ( _1 :: _2 ) # 317 "yacc_parser.ml" : 'rules)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'rule) in Obj.repr( # 115 "yacc_parser.mly" ( _1 ) # 324 "yacc_parser.ml" : 'general_rule)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'rule) in Obj.repr( # 117 "yacc_parser.mly" ( Yacc_syntax.issue_warning "ocamlyacc documentation recommends adding a semicolon at end of each grammar rules"; _1 ) # 332 "yacc_parser.ml" : 'general_rule)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Yacc_syntax.ident) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'right_part) in Obj.repr( # 123 "yacc_parser.mly" ( (_1,_3) ) # 340 "yacc_parser.ml" : 'rule)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 3 : Yacc_syntax.ident) in let _4 = (Parsing.peek_val __caml_parser_env 0 : 'right_part) in Obj.repr( # 125 "yacc_parser.mly" ( (_1,_4) ) # 348 "yacc_parser.ml" : 'rule)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'word) in let _2 = (Parsing.peek_val __caml_parser_env 0 : Yacc_syntax.location) in Obj.repr( # 130 "yacc_parser.mly" ( [(_1,_2)] ) # 356 "yacc_parser.ml" : 'right_part)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 3 : 'word) in let _2 = (Parsing.peek_val __caml_parser_env 2 : Yacc_syntax.location) in let _4 = (Parsing.peek_val __caml_parser_env 0 : 'right_part) in Obj.repr( # 132 "yacc_parser.mly" ( (_1,_2) :: _4 ) # 365 "yacc_parser.ml" : 'right_part)) ; (fun __caml_parser_env -> Obj.repr( # 137 "yacc_parser.mly" ( [] ) # 371 "yacc_parser.ml" : 'word)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : Yacc_syntax.ident) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'word) in Obj.repr( # 139 "yacc_parser.mly" ( _1 :: _2 ) # 379 "yacc_parser.ml" : 'word)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 1 : Yacc_syntax.ident) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'word) in Obj.repr( # 141 "yacc_parser.mly" ( _2 :: _3 ) # 387 "yacc_parser.ml" : 'word)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 0 : 'word) in Obj.repr( # 143 "yacc_parser.mly" ( _2 ) # 394 "yacc_parser.ml" : 'word)) (* Entry yacc_definitions *) ; (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 yacc_definitions (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = (Parsing.yyparse yytables 1 lexfun lexbuf : Yacc_syntax.yacc_definitions)