type token = | LAMBDA of (Support.Error.info) | IF of (Support.Error.info) | THEN of (Support.Error.info) | ELSE of (Support.Error.info) | TRUE of (Support.Error.info) | FALSE of (Support.Error.info) | BOOL of (Support.Error.info) | UCID of (string Support.Error.withinfo) | LCID of (string Support.Error.withinfo) | INTV of (int Support.Error.withinfo) | FLOATV of (float Support.Error.withinfo) | STRINGV of (string Support.Error.withinfo) | APOSTROPHE of (Support.Error.info) | DQUOTE of (Support.Error.info) | ARROW of (Support.Error.info) | BANG of (Support.Error.info) | BARGT of (Support.Error.info) | BARRCURLY of (Support.Error.info) | BARRSQUARE of (Support.Error.info) | COLON of (Support.Error.info) | COLONCOLON of (Support.Error.info) | COLONEQ of (Support.Error.info) | COLONHASH of (Support.Error.info) | COMMA of (Support.Error.info) | DARROW of (Support.Error.info) | DDARROW of (Support.Error.info) | DOT of (Support.Error.info) | EOF of (Support.Error.info) | EQ of (Support.Error.info) | EQEQ of (Support.Error.info) | EXISTS of (Support.Error.info) | GT of (Support.Error.info) | HASH of (Support.Error.info) | LCURLY of (Support.Error.info) | LCURLYBAR of (Support.Error.info) | LEFTARROW of (Support.Error.info) | LPAREN of (Support.Error.info) | LSQUARE of (Support.Error.info) | LSQUAREBAR of (Support.Error.info) | LT of (Support.Error.info) | RCURLY of (Support.Error.info) | RPAREN of (Support.Error.info) | RSQUARE of (Support.Error.info) | SEMI of (Support.Error.info) | SLASH of (Support.Error.info) | STAR of (Support.Error.info) | TRIANGLE of (Support.Error.info) | USCORE of (Support.Error.info) | VBAR of (Support.Error.info) open Parsing;; # 7 "parser.mly" open Support.Error open Support.Pervasive open Syntax # 58 "parser.ml" let yytransl_const = [| 0|] let yytransl_block = [| 257 (* LAMBDA *); 258 (* IF *); 259 (* THEN *); 260 (* ELSE *); 261 (* TRUE *); 262 (* FALSE *); 263 (* BOOL *); 264 (* UCID *); 265 (* LCID *); 266 (* INTV *); 267 (* FLOATV *); 268 (* STRINGV *); 269 (* APOSTROPHE *); 270 (* DQUOTE *); 271 (* ARROW *); 272 (* BANG *); 273 (* BARGT *); 274 (* BARRCURLY *); 275 (* BARRSQUARE *); 276 (* COLON *); 277 (* COLONCOLON *); 278 (* COLONEQ *); 279 (* COLONHASH *); 280 (* COMMA *); 281 (* DARROW *); 282 (* DDARROW *); 283 (* DOT *); 0 (* EOF *); 284 (* EQ *); 285 (* EQEQ *); 286 (* EXISTS *); 287 (* GT *); 288 (* HASH *); 289 (* LCURLY *); 290 (* LCURLYBAR *); 291 (* LEFTARROW *); 292 (* LPAREN *); 293 (* LSQUARE *); 294 (* LSQUAREBAR *); 295 (* LT *); 296 (* RCURLY *); 297 (* RPAREN *); 298 (* RSQUARE *); 299 (* SEMI *); 300 (* SLASH *); 301 (* STAR *); 302 (* TRIANGLE *); 303 (* USCORE *); 304 (* VBAR *); 0|] let yylhs = "\255\255\ \001\000\001\000\002\000\002\000\004\000\005\000\007\000\007\000\ \006\000\006\000\003\000\003\000\003\000\003\000\008\000\008\000\ \009\000\009\000\009\000\009\000\000\000" let yylen = "\002\000\ \001\000\003\000\001\000\002\000\002\000\001\000\003\000\001\000\ \003\000\001\000\001\000\006\000\006\000\006\000\001\000\002\000\ \003\000\001\000\001\000\001\000\002\000" let yydefred = "\000\000\ \000\000\000\000\000\000\000\000\019\000\020\000\000\000\001\000\ \000\000\021\000\000\000\003\000\000\000\015\000\000\000\000\000\ \018\000\000\000\000\000\004\000\000\000\000\000\016\000\000\000\ \000\000\000\000\008\000\000\000\005\000\006\000\000\000\017\000\ \002\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\007\000\009\000\012\000\013\000\014\000" let yydgoto = "\002\000\ \010\000\011\000\012\000\020\000\029\000\030\000\031\000\013\000\ \014\000" let yysindex = "\010\000\ \001\000\000\000\247\254\012\255\000\000\000\000\243\254\000\000\ \012\255\000\000\225\254\000\000\014\255\000\000\252\254\005\255\ \000\000\025\255\253\254\000\000\244\254\001\000\000\000\253\254\ \253\254\012\255\000\000\253\254\000\000\000\000\016\255\000\000\ \000\000\007\255\008\255\033\255\254\254\253\254\012\255\012\255\ \012\255\000\000\000\000\000\000\000\000\000\000" let yyrindex = "\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\255\000\000\ \000\000\000\000\000\000\000\000\255\254\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\237\254\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000" let yygindex = "\000\000\ \019\000\000\000\006\000\000\000\002\000\011\000\000\000\000\000\ \031\000" let yytablesize = 293 let yytable = "\015\000\ \008\000\011\000\011\000\027\000\018\000\018\000\019\000\010\000\ \018\000\018\000\001\000\022\000\003\000\004\000\021\000\024\000\ \005\000\006\000\005\000\006\000\017\000\010\000\017\000\010\000\ \025\000\034\000\035\000\026\000\032\000\037\000\038\000\036\000\ \028\000\039\000\040\000\018\000\041\000\016\000\042\000\011\000\ \033\000\011\000\018\000\023\000\044\000\045\000\046\000\009\000\ \043\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\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\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\004\000\000\000\000\000\005\000\006\000\000\000\ \000\000\007\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\009\000" let yycheck = "\009\001\ \000\000\003\001\004\001\007\001\005\001\006\001\020\001\027\001\ \009\001\004\000\001\000\043\001\001\001\002\001\009\000\020\001\ \005\001\006\001\005\001\006\001\009\001\041\001\009\001\043\001\ \020\001\024\000\025\000\003\001\041\001\028\000\015\001\026\000\ \036\001\027\001\027\001\036\001\004\001\047\001\041\001\041\001\ \022\000\043\001\043\001\013\000\039\000\040\000\041\000\036\001\ \038\000\036\001\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\001\001\002\001\255\255\255\255\005\001\006\001\255\255\ \255\255\009\001\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\036\001" let yynames_const = "\ " let yynames_block = "\ LAMBDA\000\ IF\000\ THEN\000\ ELSE\000\ TRUE\000\ FALSE\000\ BOOL\000\ UCID\000\ LCID\000\ INTV\000\ FLOATV\000\ STRINGV\000\ APOSTROPHE\000\ DQUOTE\000\ ARROW\000\ BANG\000\ BARGT\000\ BARRCURLY\000\ BARRSQUARE\000\ COLON\000\ COLONCOLON\000\ COLONEQ\000\ COLONHASH\000\ COMMA\000\ DARROW\000\ DDARROW\000\ DOT\000\ EOF\000\ EQ\000\ EQEQ\000\ EXISTS\000\ GT\000\ HASH\000\ LCURLY\000\ LCURLYBAR\000\ LEFTARROW\000\ LPAREN\000\ LSQUARE\000\ LSQUAREBAR\000\ LT\000\ RCURLY\000\ RPAREN\000\ RSQUARE\000\ SEMI\000\ SLASH\000\ STAR\000\ TRIANGLE\000\ USCORE\000\ VBAR\000\ " let yyact = [| (fun _ -> failwith "parser") ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : Support.Error.info) in Obj.repr( # 106 "parser.mly" ( fun ctx -> [],ctx ) # 297 "parser.ml" : Syntax.context -> (Syntax.command list * Syntax.context) )) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : 'Command) in let _2 = (Parsing.peek_val __caml_parser_env 1 : Support.Error.info) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Syntax.context -> (Syntax.command list * Syntax.context) ) in Obj.repr( # 108 "parser.mly" ( fun ctx -> let cmd,ctx = _1 ctx in let cmds,ctx = _3 ctx in cmd::cmds,ctx ) # 309 "parser.ml" : Syntax.context -> (Syntax.command list * Syntax.context) )) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'Term) in Obj.repr( # 116 "parser.mly" ( fun ctx -> (let t = _1 ctx in Eval(tmInfo t,t)),ctx ) # 316 "parser.ml" : 'Command)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : string Support.Error.withinfo) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'Binder) in Obj.repr( # 118 "parser.mly" ( fun ctx -> ((Bind(_1.i,_1.v,_2 ctx)), addname ctx _1.v) ) # 324 "parser.ml" : 'Command)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : Support.Error.info) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'Type) in Obj.repr( # 123 "parser.mly" ( fun ctx -> VarBind (_2 ctx)) # 332 "parser.ml" : 'Binder)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'ArrowType) in Obj.repr( # 128 "parser.mly" ( _1 ) # 339 "parser.ml" : 'Type)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Support.Error.info) in let _2 = (Parsing.peek_val __caml_parser_env 1 : 'Type) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Support.Error.info) in Obj.repr( # 133 "parser.mly" ( _2 ) # 348 "parser.ml" : 'AType)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : Support.Error.info) in Obj.repr( # 135 "parser.mly" ( fun ctx -> TyBool ) # 355 "parser.ml" : 'AType)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : 'AType) in let _2 = (Parsing.peek_val __caml_parser_env 1 : Support.Error.info) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'ArrowType) in Obj.repr( # 141 "parser.mly" ( fun ctx -> TyArr(_1 ctx, _3 ctx) ) # 364 "parser.ml" : 'ArrowType)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'AType) in Obj.repr( # 143 "parser.mly" ( _1 ) # 371 "parser.ml" : 'ArrowType)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'AppTerm) in Obj.repr( # 147 "parser.mly" ( _1 ) # 378 "parser.ml" : 'Term)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 5 : Support.Error.info) in let _2 = (Parsing.peek_val __caml_parser_env 4 : string Support.Error.withinfo) in let _3 = (Parsing.peek_val __caml_parser_env 3 : Support.Error.info) in let _4 = (Parsing.peek_val __caml_parser_env 2 : 'Type) in let _5 = (Parsing.peek_val __caml_parser_env 1 : Support.Error.info) in let _6 = (Parsing.peek_val __caml_parser_env 0 : 'Term) in Obj.repr( # 149 "parser.mly" ( fun ctx -> let ctx1 = addname ctx _2.v in TmAbs(_1, _2.v, _4 ctx, _6 ctx1) ) # 392 "parser.ml" : 'Term)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 5 : Support.Error.info) in let _2 = (Parsing.peek_val __caml_parser_env 4 : Support.Error.info) in let _3 = (Parsing.peek_val __caml_parser_env 3 : Support.Error.info) in let _4 = (Parsing.peek_val __caml_parser_env 2 : 'Type) in let _5 = (Parsing.peek_val __caml_parser_env 1 : Support.Error.info) in let _6 = (Parsing.peek_val __caml_parser_env 0 : 'Term) in Obj.repr( # 153 "parser.mly" ( fun ctx -> let ctx1 = addname ctx "_" in TmAbs(_1, "_", _4 ctx, _6 ctx1) ) # 406 "parser.ml" : 'Term)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 5 : Support.Error.info) in let _2 = (Parsing.peek_val __caml_parser_env 4 : 'Term) in let _3 = (Parsing.peek_val __caml_parser_env 3 : Support.Error.info) in let _4 = (Parsing.peek_val __caml_parser_env 2 : 'Term) in let _5 = (Parsing.peek_val __caml_parser_env 1 : Support.Error.info) in let _6 = (Parsing.peek_val __caml_parser_env 0 : 'Term) in Obj.repr( # 157 "parser.mly" ( fun ctx -> TmIf(_1, _2 ctx, _4 ctx, _6 ctx) ) # 418 "parser.ml" : 'Term)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'ATerm) in Obj.repr( # 161 "parser.mly" ( _1 ) # 425 "parser.ml" : 'AppTerm)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'AppTerm) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'ATerm) in Obj.repr( # 163 "parser.mly" ( fun ctx -> let e1 = _1 ctx in let e2 = _2 ctx in TmApp(tmInfo e1,e1,e2) ) # 436 "parser.ml" : 'AppTerm)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Support.Error.info) in let _2 = (Parsing.peek_val __caml_parser_env 1 : 'Term) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Support.Error.info) in Obj.repr( # 171 "parser.mly" ( _2 ) # 445 "parser.ml" : 'ATerm)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : string Support.Error.withinfo) in Obj.repr( # 173 "parser.mly" ( fun ctx -> TmVar(_1.i, name2index _1.i ctx _1.v, ctxlength ctx) ) # 453 "parser.ml" : 'ATerm)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : Support.Error.info) in Obj.repr( # 176 "parser.mly" ( fun ctx -> TmTrue(_1) ) # 460 "parser.ml" : 'ATerm)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : Support.Error.info) in Obj.repr( # 178 "parser.mly" ( fun ctx -> TmFalse(_1) ) # 467 "parser.ml" : 'ATerm)) (* Entry toplevel *) ; (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 toplevel (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = (Parsing.yyparse yytables 1 lexfun lexbuf : Syntax.context -> (Syntax.command list * Syntax.context) )