type token = | AND | ARRAY | ASSIGN | BREAK | COLON | COMMA | DIVIDE | DO | DOT | ELSE | END | EOF | EQ | EXCEPTION | FOR | FUNCTION | GE | GT | HANDLE | IF | IN | LBRACE | LBRACK | LE | LET | LPAREN | LT | MINUS | NEQ | NIL | OF | OR | PLUS | RAISE | RBRACE | RBRACK | RPAREN | SEMICOLON | SPAWN | TIMES | THEN | TO | TRY | TYPE | VAR | WHILE | INT of (int) | ID of (string) | STRING of (string) open Parsing;; # 2 "parser.mly" module E = Error module A = Ast module S = Symbol let getpos = Parsing.symbol_start let parse_error s = let pos = getpos() in raise (E.Error(E.Syntax_error, pos)) (* record creation functions *) let mkField n t = (n, t, getpos()) let mkSimpleVar v = A.SimpleVar(v, getpos()) let mkFieldVar v t = A.FieldVar(v, t, getpos()) let mkSubscriptVar v e = A.SubscriptVar(v, e, getpos()) let mkNilExp = A.NilExp let mkVarExp v = A.VarExp(v) let mkIntExp i = A.IntExp(i) let mkStringExp s = A.StringExp(s, getpos()) let mkCallExp f a = A.CallExp(f, a, getpos()) let mkOpExp l r op = A.OpExp(l, op, r, getpos()) let mkRecFld n e = (n, e, getpos()) let mkRecExp n f = A.RecordExp(n, f, getpos()) let mkSeqExp el = A.SeqExp(el, getpos()) let mkAssignExp v e = A.AssignExp(v, e, getpos()) let mkIfExp tst t e = A.IfExp(tst, t, e, getpos()) let mkWhileExp tst b = A.WhileExp(tst, b, getpos()) let mkForExp v lo hi body = A.ForExp(v, lo, hi, body, getpos()) let mkBreakExp = A.BreakExp(getpos()) let mkLetExp decs body = A.LetExp(decs, body, getpos()) let mkArrayExp v s init = A.ArrayExp(v, s, init, getpos()) let mkHandler name exp = (name, exp, getpos()) let mkTryExp exp handlers = A.TryExp(exp, handlers, getpos()) let mkRaise id = A.RaiseExp(id, getpos()) let mkSpawn id = A.SpawnExp(id, getpos()) let mkFunDec n f t b = (n, f, t, b, getpos()) let mkFunctionDec l = A.FunctionDec(l) let mkVarDec n t i = A.VarDec(n, t, i, getpos()) let mkTyDec n t = (n, t, getpos()) let mkTypeDec l = A.TypeDec(l) let mkNameTy n = A.NameTy(n, getpos()) let mkRecordTy l = A.RecordTy(l) let mkArrayTy n = A.ArrayTy(n, getpos()) let mkException s = A.ExceptionDec(s, getpos()) # 103 "parser.ml" let yytransl_const = [| 257 (* AND *); 258 (* ARRAY *); 259 (* ASSIGN *); 260 (* BREAK *); 261 (* COLON *); 262 (* COMMA *); 263 (* DIVIDE *); 264 (* DO *); 265 (* DOT *); 266 (* ELSE *); 267 (* END *); 0 (* EOF *); 268 (* EQ *); 269 (* EXCEPTION *); 270 (* FOR *); 271 (* FUNCTION *); 272 (* GE *); 273 (* GT *); 274 (* HANDLE *); 275 (* IF *); 276 (* IN *); 277 (* LBRACE *); 278 (* LBRACK *); 279 (* LE *); 280 (* LET *); 281 (* LPAREN *); 282 (* LT *); 283 (* MINUS *); 284 (* NEQ *); 285 (* NIL *); 286 (* OF *); 287 (* OR *); 288 (* PLUS *); 289 (* RAISE *); 290 (* RBRACE *); 291 (* RBRACK *); 292 (* RPAREN *); 293 (* SEMICOLON *); 294 (* SPAWN *); 295 (* TIMES *); 296 (* THEN *); 297 (* TO *); 298 (* TRY *); 299 (* TYPE *); 300 (* VAR *); 301 (* WHILE *); 0|] let yytransl_block = [| 302 (* INT *); 303 (* ID *); 304 (* STRING *); 0|] let yylhs = "\255\255\ \001\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\ \016\000\003\000\003\000\003\000\003\000\003\000\005\000\005\000\ \014\000\014\000\006\000\006\000\006\000\007\000\017\000\017\000\ \017\000\008\000\008\000\008\000\008\000\008\000\009\000\009\000\ \009\000\009\000\009\000\009\000\010\000\010\000\011\000\011\000\ \018\000\018\000\012\000\012\000\013\000\013\000\013\000\019\000\ \015\000\015\000\004\000\004\000\020\000\020\000\020\000\020\000\ \021\000\021\000\022\000\022\000\025\000\026\000\026\000\026\000\ \027\000\027\000\027\000\023\000\023\000\028\000\028\000\024\000\ \000\000" let yylen = "\002\000\ \002\000\001\000\001\000\001\000\001\000\001\000\001\000\001\000\ \001\000\003\000\001\000\001\000\005\000\003\000\002\000\002\000\ \001\000\001\000\003\000\004\000\003\000\004\000\002\000\003\000\ \001\000\003\000\001\000\001\000\001\000\004\000\000\000\001\000\ \003\000\002\000\003\000\003\000\003\000\003\000\003\000\003\000\ \003\000\003\000\003\000\003\000\003\000\003\000\004\000\006\000\ \003\000\005\000\004\000\006\000\004\000\008\000\001\000\004\000\ \001\000\002\000\001\000\002\000\001\000\001\000\001\000\001\000\ \004\000\006\000\001\000\002\000\004\000\001\000\003\000\003\000\ \000\000\003\000\005\000\001\000\002\000\007\000\009\000\002\000\ \002\000" let yydefred = "\000\000\ \000\000\000\000\055\000\000\000\000\000\000\000\000\000\000\000\ \027\000\000\000\000\000\000\000\000\000\028\000\017\000\029\000\ \081\000\000\000\000\000\003\000\004\000\005\000\006\000\007\000\ \008\000\009\000\011\000\012\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\061\000\062\000\063\000\ \064\000\000\000\000\000\023\000\000\000\000\000\034\000\015\000\ \016\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\080\000\000\000\000\000\000\000\000\000\060\000\068\000\ \077\000\000\000\024\000\000\000\014\000\000\000\000\000\000\000\ \038\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\037\000\000\000\021\000\000\000\019\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\026\000\000\000\058\000\000\000\022\000\ \000\000\047\000\000\000\000\000\030\000\000\000\000\000\000\000\ \000\000\000\000\000\000\070\000\069\000\000\000\000\000\013\000\ \000\000\000\000\000\000\033\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\056\000\000\000\000\000\000\000\000\000\ \000\000\000\000\072\000\071\000\000\000\050\000\000\000\000\000\ \000\000\000\000\075\000\000\000\000\000" let yydgoto = "\002\000\ \017\000\045\000\019\000\036\000\020\000\021\000\022\000\023\000\ \024\000\025\000\026\000\027\000\028\000\046\000\085\000\029\000\ \108\000\105\000\086\000\037\000\038\000\039\000\040\000\041\000\ \042\000\133\000\129\000\043\000" let yysindex = "\005\000\ \138\255\000\000\000\000\218\254\138\255\160\255\004\255\138\255\ \000\000\218\254\218\254\138\255\138\255\000\000\000\000\000\000\ \000\000\029\003\008\255\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\059\255\013\255\206\255\218\254\ \218\254\218\254\218\254\015\255\160\255\000\000\000\000\000\000\ \000\000\237\254\012\255\000\000\046\003\017\255\000\000\000\000\ \000\000\063\003\091\003\138\255\138\255\000\000\138\255\138\255\ \138\255\138\255\138\255\138\255\138\255\138\255\138\255\138\255\ \138\255\218\254\138\255\218\254\218\254\138\255\138\255\138\255\ \138\255\000\000\018\255\032\255\036\255\138\255\000\000\000\000\ \000\000\138\255\000\000\218\254\000\000\030\255\138\255\142\003\ \000\000\249\254\249\254\249\254\249\254\249\254\253\254\249\254\ \142\003\253\254\000\000\002\004\000\000\108\003\000\000\044\255\ \042\255\125\003\160\003\034\255\081\255\188\003\218\254\000\255\ \138\255\218\254\068\255\000\000\138\255\000\000\002\004\000\000\ \138\255\000\000\061\255\138\255\000\000\138\255\138\255\091\255\ \070\255\065\255\218\254\000\000\000\000\002\004\108\255\000\000\ \206\003\224\003\138\255\000\000\241\003\002\004\218\254\007\255\ \218\254\097\255\138\255\000\000\218\254\002\004\138\255\118\255\ \218\254\138\255\000\000\000\000\002\004\000\000\002\004\218\254\ \113\255\002\004\000\000\138\255\002\004" 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\086\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\045\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\119\255\000\000\000\000\000\000\ \000\000\090\255\074\255\000\000\002\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\102\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\127\000\000\000\250\000\ \000\000\039\001\083\001\124\001\165\001\206\001\168\000\247\001\ \032\002\209\000\000\000\071\002\000\000\000\000\000\000\000\000\ \000\000\000\000\104\255\000\000\000\000\244\002\107\255\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\110\002\000\000\ \000\000\000\000\001\000\102\255\000\000\000\000\000\000\000\000\ \000\000\000\000\112\255\000\000\000\000\101\255\000\000\000\000\ \000\000\114\255\000\000\000\000\000\000\121\002\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\162\002\000\000\049\255\ \000\000\000\000\000\000\000\000\117\255\000\000\203\002\056\255\ \000\000\157\255\000\000\000\000\182\255" let yygindex = "\000\000\ \000\000\002\000\000\000\110\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\200\255\064\000\067\000\ \030\000\006\000\000\000\000\000\000\000\116\000\121\000\000\000\ \000\000\000\000\130\255\000\000" let yytablesize = 1321 let yytable = "\053\000\ \020\000\130\000\018\000\053\000\146\000\001\000\031\000\003\000\ \015\000\047\000\065\000\153\000\025\000\050\000\051\000\072\000\ \066\000\004\000\154\000\060\000\131\000\115\000\005\000\034\000\ \063\000\116\000\033\000\006\000\007\000\067\000\008\000\064\000\ \009\000\163\000\078\000\064\000\010\000\025\000\113\000\044\000\ \114\000\011\000\111\000\112\000\018\000\012\000\015\000\084\000\ \013\000\014\000\015\000\016\000\083\000\088\000\089\000\121\000\ \090\000\091\000\092\000\093\000\094\000\095\000\096\000\097\000\ \098\000\099\000\100\000\068\000\102\000\125\000\030\000\106\000\ \107\000\109\000\110\000\122\000\048\000\049\000\136\000\069\000\ \070\000\052\000\074\000\071\000\074\000\002\000\076\000\053\000\ \119\000\073\000\139\000\073\000\055\000\076\000\145\000\143\000\ \056\000\057\000\074\000\075\000\076\000\077\000\067\000\058\000\ \067\000\144\000\059\000\060\000\061\000\067\000\147\000\062\000\ \063\000\065\000\134\000\065\000\076\000\076\000\137\000\064\000\ \065\000\126\000\138\000\160\000\164\000\107\000\057\000\141\000\ \142\000\066\000\156\000\066\000\101\000\067\000\103\000\104\000\ \066\000\031\000\059\000\032\000\150\000\003\000\073\000\065\000\ \065\000\073\000\079\000\049\000\157\000\118\000\117\000\004\000\ \159\000\140\000\158\000\162\000\005\000\080\000\000\000\066\000\ \066\000\006\000\007\000\081\000\008\000\165\000\009\000\036\000\ \000\000\078\000\010\000\078\000\032\000\000\000\033\000\011\000\ \078\000\128\000\132\000\012\000\135\000\000\000\013\000\014\000\ \015\000\016\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\079\000\000\000\079\000\128\000\000\000\078\000\ \078\000\079\000\034\000\035\000\000\000\000\000\052\000\000\000\ \035\000\152\000\000\000\155\000\053\000\000\000\000\000\104\000\ \000\000\055\000\000\000\161\000\000\000\056\000\057\000\000\000\ \079\000\079\000\128\000\000\000\058\000\000\000\000\000\059\000\ \060\000\061\000\000\000\000\000\062\000\063\000\000\000\000\000\ \000\000\000\000\000\000\000\000\064\000\073\000\000\000\000\000\ \000\000\045\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\020\000\000\000\020\000\000\000\000\000\020\000\020\000\ \020\000\020\000\020\000\020\000\020\000\020\000\000\000\020\000\ \020\000\020\000\020\000\000\000\020\000\000\000\020\000\020\000\ \000\000\000\000\020\000\020\000\020\000\000\000\000\000\020\000\ \020\000\000\000\020\000\020\000\020\000\020\000\039\000\020\000\ \020\000\020\000\000\000\020\000\020\000\018\000\000\000\018\000\ \000\000\000\000\018\000\018\000\018\000\000\000\018\000\018\000\ \018\000\018\000\000\000\018\000\018\000\018\000\018\000\000\000\ \018\000\000\000\000\000\018\000\000\000\000\000\018\000\018\000\ \018\000\000\000\000\000\018\000\018\000\000\000\018\000\018\000\ \018\000\018\000\043\000\018\000\018\000\018\000\002\000\018\000\ \018\000\000\000\000\000\002\000\002\000\002\000\000\000\002\000\ \002\000\002\000\002\000\000\000\002\000\002\000\002\000\002\000\ \000\000\002\000\000\000\000\000\002\000\000\000\000\000\002\000\ \002\000\002\000\000\000\000\000\002\000\002\000\000\000\002\000\ \002\000\002\000\002\000\041\000\002\000\002\000\002\000\057\000\ \002\000\002\000\000\000\000\000\057\000\057\000\057\000\000\000\ \057\000\057\000\057\000\057\000\000\000\057\000\057\000\057\000\ \000\000\000\000\057\000\000\000\000\000\057\000\000\000\000\000\ \057\000\057\000\057\000\000\000\000\000\057\000\057\000\000\000\ \057\000\057\000\057\000\057\000\044\000\057\000\057\000\057\000\ \036\000\057\000\057\000\000\000\000\000\036\000\000\000\036\000\ \000\000\036\000\036\000\036\000\036\000\000\000\036\000\036\000\ \036\000\036\000\000\000\036\000\000\000\000\000\036\000\000\000\ \000\000\036\000\036\000\036\000\000\000\000\000\036\000\036\000\ \000\000\036\000\036\000\036\000\036\000\042\000\000\000\036\000\ \036\000\035\000\036\000\036\000\000\000\000\000\035\000\000\000\ \035\000\000\000\035\000\035\000\035\000\035\000\000\000\035\000\ \035\000\035\000\035\000\000\000\035\000\000\000\000\000\035\000\ \000\000\000\000\035\000\035\000\035\000\000\000\000\000\035\000\ \035\000\000\000\035\000\035\000\035\000\035\000\040\000\000\000\ \035\000\035\000\045\000\035\000\035\000\000\000\000\000\045\000\ \000\000\045\000\000\000\045\000\045\000\000\000\045\000\000\000\ \045\000\000\000\000\000\045\000\000\000\045\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \045\000\000\000\000\000\045\000\045\000\045\000\045\000\046\000\ \000\000\045\000\045\000\000\000\045\000\045\000\000\000\039\000\ \000\000\000\000\000\000\000\000\039\000\000\000\039\000\000\000\ \039\000\039\000\000\000\039\000\000\000\039\000\000\000\000\000\ \039\000\000\000\039\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\039\000\010\000\000\000\ \039\000\039\000\039\000\039\000\000\000\000\000\039\000\039\000\ \000\000\039\000\039\000\043\000\000\000\000\000\000\000\000\000\ \043\000\000\000\043\000\000\000\043\000\043\000\000\000\043\000\ \000\000\043\000\000\000\000\000\043\000\000\000\043\000\000\000\ \000\000\000\000\000\000\000\000\000\000\053\000\000\000\000\000\ \000\000\043\000\000\000\000\000\043\000\043\000\043\000\043\000\ \052\000\000\000\043\000\043\000\041\000\043\000\043\000\000\000\ \000\000\041\000\000\000\041\000\000\000\041\000\041\000\000\000\ \041\000\000\000\041\000\000\000\000\000\041\000\000\000\041\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\041\000\000\000\000\000\041\000\041\000\041\000\ \041\000\048\000\000\000\041\000\041\000\044\000\041\000\041\000\ \000\000\000\000\044\000\000\000\044\000\000\000\044\000\044\000\ \000\000\044\000\000\000\044\000\000\000\000\000\044\000\000\000\ \044\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\044\000\000\000\000\000\044\000\044\000\ \044\000\044\000\054\000\000\000\044\000\044\000\042\000\044\000\ \044\000\000\000\000\000\042\000\000\000\042\000\000\000\042\000\ \042\000\000\000\042\000\000\000\042\000\000\000\000\000\042\000\ \000\000\042\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\042\000\000\000\000\000\042\000\ \042\000\042\000\042\000\051\000\000\000\042\000\042\000\040\000\ \042\000\042\000\000\000\000\000\040\000\000\000\040\000\000\000\ \040\000\040\000\000\000\040\000\000\000\040\000\000\000\000\000\ \040\000\000\000\040\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\ \040\000\040\000\040\000\040\000\054\000\000\000\040\000\040\000\ \046\000\040\000\040\000\000\000\000\000\046\000\000\000\046\000\ \000\000\046\000\046\000\000\000\046\000\000\000\046\000\000\000\ \000\000\046\000\000\000\046\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\046\000\000\000\ \000\000\046\000\046\000\046\000\046\000\000\000\000\000\046\000\ \046\000\000\000\046\000\046\000\010\000\000\000\010\000\000\000\ \010\000\010\000\000\000\010\000\000\000\010\000\000\000\000\000\ \010\000\000\000\010\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \010\000\010\000\010\000\010\000\000\000\000\000\010\000\010\000\ \000\000\010\000\010\000\053\000\000\000\053\000\000\000\053\000\ \053\000\000\000\053\000\000\000\053\000\000\000\052\000\053\000\ \052\000\053\000\052\000\052\000\000\000\052\000\000\000\052\000\ \000\000\000\000\052\000\000\000\052\000\000\000\000\000\053\000\ \053\000\053\000\053\000\000\000\000\000\053\000\053\000\000\000\ \053\000\053\000\052\000\052\000\052\000\052\000\000\000\000\000\ \052\000\052\000\000\000\052\000\052\000\000\000\000\000\048\000\ \000\000\048\000\000\000\048\000\048\000\000\000\048\000\000\000\ \048\000\000\000\000\000\048\000\000\000\048\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\048\000\048\000\048\000\048\000\000\000\ \000\000\048\000\048\000\000\000\048\000\048\000\000\000\000\000\ \054\000\000\000\054\000\000\000\054\000\054\000\000\000\054\000\ \000\000\054\000\000\000\000\000\054\000\000\000\054\000\000\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\054\000\054\000\054\000\054\000\ \000\000\000\000\054\000\054\000\000\000\054\000\054\000\000\000\ \000\000\051\000\000\000\051\000\000\000\000\000\051\000\000\000\ \051\000\000\000\051\000\000\000\000\000\051\000\000\000\051\000\ \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\ \000\000\000\000\000\000\000\000\000\000\051\000\051\000\051\000\ \051\000\000\000\000\000\051\000\051\000\052\000\051\000\051\000\ \000\000\000\000\000\000\053\000\000\000\000\000\000\000\000\000\ \055\000\000\000\000\000\000\000\056\000\057\000\052\000\000\000\ \000\000\000\000\000\000\058\000\053\000\000\000\059\000\060\000\ \061\000\055\000\000\000\062\000\063\000\056\000\057\000\052\000\ \000\000\000\000\000\000\064\000\058\000\053\000\000\000\059\000\ \060\000\061\000\055\000\000\000\062\000\063\000\056\000\057\000\ \084\000\000\000\082\000\000\000\064\000\058\000\000\000\000\000\ \059\000\060\000\061\000\052\000\000\000\062\000\063\000\000\000\ \000\000\053\000\087\000\000\000\000\000\064\000\055\000\000\000\ \000\000\000\000\056\000\057\000\052\000\000\000\000\000\000\000\ \000\000\058\000\053\000\000\000\059\000\060\000\061\000\055\000\ \000\000\062\000\063\000\056\000\057\000\052\000\000\000\000\000\ \000\000\064\000\058\000\053\000\000\000\059\000\060\000\061\000\ \055\000\000\000\062\000\063\000\056\000\057\000\120\000\000\000\ \000\000\000\000\064\000\058\000\053\000\000\000\059\000\060\000\ \061\000\055\000\000\000\062\000\063\000\056\000\057\000\123\000\ \052\000\000\000\000\000\064\000\058\000\124\000\053\000\059\000\ \060\000\061\000\000\000\055\000\000\000\063\000\000\000\056\000\ \057\000\000\000\000\000\000\000\064\000\000\000\058\000\000\000\ \000\000\059\000\060\000\061\000\052\000\000\000\062\000\063\000\ \000\000\000\000\053\000\000\000\000\000\127\000\064\000\055\000\ \000\000\000\000\000\000\056\000\057\000\000\000\052\000\000\000\ \000\000\000\000\058\000\000\000\053\000\059\000\060\000\061\000\ \148\000\055\000\062\000\063\000\000\000\056\000\057\000\000\000\ \052\000\000\000\064\000\000\000\058\000\149\000\053\000\059\000\ \060\000\061\000\000\000\055\000\062\000\063\000\000\000\056\000\ \057\000\052\000\000\000\000\000\064\000\000\000\058\000\053\000\ \151\000\059\000\060\000\061\000\055\000\000\000\062\000\063\000\ \056\000\057\000\052\000\000\000\000\000\000\000\064\000\058\000\ \053\000\000\000\059\000\060\000\061\000\055\000\000\000\062\000\ \063\000\056\000\057\000\000\000\000\000\000\000\000\000\064\000\ \058\000\000\000\000\000\059\000\060\000\061\000\000\000\000\000\ \062\000\063\000\000\000\000\000\000\000\000\000\000\000\000\000\ \064\000" let yycheck = "\007\001\ \000\000\002\001\001\000\007\001\131\000\001\000\005\000\004\001\ \047\001\008\000\003\001\005\001\011\001\012\000\013\000\003\001\ \009\001\014\001\012\001\027\001\021\001\078\000\019\001\043\001\ \032\001\082\000\015\001\024\001\025\001\022\001\027\001\039\001\ \029\001\160\000\020\001\039\001\033\001\036\001\003\001\036\001\ \005\001\038\001\025\001\012\001\000\000\042\001\047\001\018\001\ \045\001\046\001\047\001\048\001\036\001\052\000\053\000\012\001\ \055\000\056\000\057\000\058\000\059\000\060\000\061\000\062\000\ \063\000\064\000\065\000\009\001\067\000\036\001\004\000\070\000\ \071\000\072\000\073\000\034\001\010\000\011\000\011\001\021\001\ \022\001\001\001\034\001\025\001\036\001\000\000\013\001\007\001\ \087\000\034\001\030\001\036\001\012\001\020\001\030\001\005\001\ \016\001\017\001\032\000\033\000\034\000\035\000\013\001\023\001\ \015\001\036\001\026\001\027\001\028\001\020\001\003\001\031\001\ \032\001\013\001\113\000\015\001\043\001\044\001\117\000\039\001\ \020\001\041\001\121\000\006\001\012\001\124\000\000\000\126\000\ \127\000\013\001\034\001\015\001\066\000\044\001\068\000\069\000\ \020\001\036\001\020\001\036\001\139\000\004\001\036\001\043\001\ \044\001\034\001\037\000\034\001\147\000\086\000\084\000\014\001\ \151\000\124\000\149\000\154\000\019\001\042\000\255\255\043\001\ \044\001\024\001\025\001\043\000\027\001\164\000\029\001\000\000\ \255\255\013\001\033\001\015\001\013\001\255\255\015\001\038\001\ \020\001\111\000\112\000\042\001\114\000\255\255\045\001\046\001\ \047\001\048\001\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\013\001\255\255\015\001\131\000\255\255\043\001\ \044\001\020\001\043\001\044\001\255\255\255\255\001\001\255\255\ \000\000\143\000\255\255\145\000\007\001\255\255\255\255\149\000\ \255\255\012\001\255\255\153\000\255\255\016\001\017\001\255\255\ \043\001\044\001\160\000\255\255\023\001\255\255\255\255\026\001\ \027\001\028\001\255\255\255\255\031\001\032\001\255\255\255\255\ \255\255\255\255\255\255\255\255\039\001\040\001\255\255\255\255\ \255\255\000\000\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\001\001\255\255\003\001\255\255\255\255\006\001\007\001\ \008\001\009\001\010\001\011\001\012\001\013\001\255\255\015\001\ \016\001\017\001\018\001\255\255\020\001\255\255\022\001\023\001\ \255\255\255\255\026\001\027\001\028\001\255\255\255\255\031\001\ \032\001\255\255\034\001\035\001\036\001\037\001\000\000\039\001\ \040\001\041\001\255\255\043\001\044\001\001\001\255\255\003\001\ \255\255\255\255\006\001\007\001\008\001\255\255\010\001\011\001\ \012\001\013\001\255\255\015\001\016\001\017\001\018\001\255\255\ \020\001\255\255\255\255\023\001\255\255\255\255\026\001\027\001\ \028\001\255\255\255\255\031\001\032\001\255\255\034\001\035\001\ \036\001\037\001\000\000\039\001\040\001\041\001\001\001\043\001\ \044\001\255\255\255\255\006\001\007\001\008\001\255\255\010\001\ \011\001\012\001\013\001\255\255\015\001\016\001\017\001\018\001\ \255\255\020\001\255\255\255\255\023\001\255\255\255\255\026\001\ \027\001\028\001\255\255\255\255\031\001\032\001\255\255\034\001\ \035\001\036\001\037\001\000\000\039\001\040\001\041\001\001\001\ \043\001\044\001\255\255\255\255\006\001\007\001\008\001\255\255\ \010\001\011\001\012\001\013\001\255\255\015\001\016\001\017\001\ \255\255\255\255\020\001\255\255\255\255\023\001\255\255\255\255\ \026\001\027\001\028\001\255\255\255\255\031\001\032\001\255\255\ \034\001\035\001\036\001\037\001\000\000\039\001\040\001\041\001\ \001\001\043\001\044\001\255\255\255\255\006\001\255\255\008\001\ \255\255\010\001\011\001\012\001\013\001\255\255\015\001\016\001\ \017\001\018\001\255\255\020\001\255\255\255\255\023\001\255\255\ \255\255\026\001\027\001\028\001\255\255\255\255\031\001\032\001\ \255\255\034\001\035\001\036\001\037\001\000\000\255\255\040\001\ \041\001\001\001\043\001\044\001\255\255\255\255\006\001\255\255\ \008\001\255\255\010\001\011\001\012\001\013\001\255\255\015\001\ \016\001\017\001\018\001\255\255\020\001\255\255\255\255\023\001\ \255\255\255\255\026\001\027\001\028\001\255\255\255\255\031\001\ \032\001\255\255\034\001\035\001\036\001\037\001\000\000\255\255\ \040\001\041\001\001\001\043\001\044\001\255\255\255\255\006\001\ \255\255\008\001\255\255\010\001\011\001\255\255\013\001\255\255\ \015\001\255\255\255\255\018\001\255\255\020\001\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \031\001\255\255\255\255\034\001\035\001\036\001\037\001\000\000\ \255\255\040\001\041\001\255\255\043\001\044\001\255\255\001\001\ \255\255\255\255\255\255\255\255\006\001\255\255\008\001\255\255\ \010\001\011\001\255\255\013\001\255\255\015\001\255\255\255\255\ \018\001\255\255\020\001\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\031\001\000\000\255\255\ \034\001\035\001\036\001\037\001\255\255\255\255\040\001\041\001\ \255\255\043\001\044\001\001\001\255\255\255\255\255\255\255\255\ \006\001\255\255\008\001\255\255\010\001\011\001\255\255\013\001\ \255\255\015\001\255\255\255\255\018\001\255\255\020\001\255\255\ \255\255\255\255\255\255\255\255\255\255\000\000\255\255\255\255\ \255\255\031\001\255\255\255\255\034\001\035\001\036\001\037\001\ \000\000\255\255\040\001\041\001\001\001\043\001\044\001\255\255\ \255\255\006\001\255\255\008\001\255\255\010\001\011\001\255\255\ \013\001\255\255\015\001\255\255\255\255\018\001\255\255\020\001\ \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\031\001\255\255\255\255\034\001\035\001\036\001\ \037\001\000\000\255\255\040\001\041\001\001\001\043\001\044\001\ \255\255\255\255\006\001\255\255\008\001\255\255\010\001\011\001\ \255\255\013\001\255\255\015\001\255\255\255\255\018\001\255\255\ \020\001\255\255\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\031\001\255\255\255\255\034\001\035\001\ \036\001\037\001\000\000\255\255\040\001\041\001\001\001\043\001\ \044\001\255\255\255\255\006\001\255\255\008\001\255\255\010\001\ \011\001\255\255\013\001\255\255\015\001\255\255\255\255\018\001\ \255\255\020\001\255\255\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\031\001\255\255\255\255\034\001\ \035\001\036\001\037\001\000\000\255\255\040\001\041\001\001\001\ \043\001\044\001\255\255\255\255\006\001\255\255\008\001\255\255\ \010\001\011\001\255\255\013\001\255\255\015\001\255\255\255\255\ \018\001\255\255\020\001\255\255\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\031\001\255\255\255\255\ \034\001\035\001\036\001\037\001\000\000\255\255\040\001\041\001\ \001\001\043\001\044\001\255\255\255\255\006\001\255\255\008\001\ \255\255\010\001\011\001\255\255\013\001\255\255\015\001\255\255\ \255\255\018\001\255\255\020\001\255\255\255\255\255\255\255\255\ \255\255\255\255\255\255\255\255\255\255\255\255\031\001\255\255\ \255\255\034\001\035\001\036\001\037\001\255\255\255\255\040\001\ \041\001\255\255\043\001\044\001\006\001\255\255\008\001\255\255\ \010\001\011\001\255\255\013\001\255\255\015\001\255\255\255\255\ \018\001\255\255\020\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\ \034\001\035\001\036\001\037\001\255\255\255\255\040\001\041\001\ \255\255\043\001\044\001\006\001\255\255\008\001\255\255\010\001\ \011\001\255\255\013\001\255\255\015\001\255\255\006\001\018\001\ \008\001\020\001\010\001\011\001\255\255\013\001\255\255\015\001\ \255\255\255\255\018\001\255\255\020\001\255\255\255\255\034\001\ \035\001\036\001\037\001\255\255\255\255\040\001\041\001\255\255\ \043\001\044\001\034\001\035\001\036\001\037\001\255\255\255\255\ \040\001\041\001\255\255\043\001\044\001\255\255\255\255\006\001\ \255\255\008\001\255\255\010\001\011\001\255\255\013\001\255\255\ \015\001\255\255\255\255\018\001\255\255\020\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\034\001\035\001\036\001\037\001\255\255\ \255\255\040\001\041\001\255\255\043\001\044\001\255\255\255\255\ \006\001\255\255\008\001\255\255\010\001\011\001\255\255\013\001\ \255\255\015\001\255\255\255\255\018\001\255\255\020\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\034\001\035\001\036\001\037\001\ \255\255\255\255\040\001\041\001\255\255\043\001\044\001\255\255\ \255\255\006\001\255\255\008\001\255\255\255\255\011\001\255\255\ \013\001\255\255\015\001\255\255\255\255\018\001\255\255\020\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\034\001\035\001\036\001\ \037\001\255\255\255\255\040\001\041\001\001\001\043\001\044\001\ \255\255\255\255\255\255\007\001\255\255\255\255\255\255\255\255\ \012\001\255\255\255\255\255\255\016\001\017\001\001\001\255\255\ \255\255\255\255\255\255\023\001\007\001\255\255\026\001\027\001\ \028\001\012\001\255\255\031\001\032\001\016\001\017\001\001\001\ \255\255\255\255\255\255\039\001\023\001\007\001\255\255\026\001\ \027\001\028\001\012\001\255\255\031\001\032\001\016\001\017\001\ \018\001\255\255\037\001\255\255\039\001\023\001\255\255\255\255\ \026\001\027\001\028\001\001\001\255\255\031\001\032\001\255\255\ \255\255\007\001\008\001\255\255\255\255\039\001\012\001\255\255\ \255\255\255\255\016\001\017\001\001\001\255\255\255\255\255\255\ \255\255\023\001\007\001\255\255\026\001\027\001\028\001\012\001\ \255\255\031\001\032\001\016\001\017\001\001\001\255\255\255\255\ \255\255\039\001\023\001\007\001\255\255\026\001\027\001\028\001\ \012\001\255\255\031\001\032\001\016\001\017\001\035\001\255\255\ \255\255\255\255\039\001\023\001\007\001\255\255\026\001\027\001\ \028\001\012\001\255\255\031\001\032\001\016\001\017\001\035\001\ \001\001\255\255\255\255\039\001\023\001\006\001\007\001\026\001\ \027\001\028\001\255\255\012\001\255\255\032\001\255\255\016\001\ \017\001\255\255\255\255\255\255\039\001\255\255\023\001\255\255\ \255\255\026\001\027\001\028\001\001\001\255\255\031\001\032\001\ \255\255\255\255\007\001\255\255\255\255\010\001\039\001\012\001\ \255\255\255\255\255\255\016\001\017\001\255\255\001\001\255\255\ \255\255\255\255\023\001\255\255\007\001\026\001\027\001\028\001\ \011\001\012\001\031\001\032\001\255\255\016\001\017\001\255\255\ \001\001\255\255\039\001\255\255\023\001\006\001\007\001\026\001\ \027\001\028\001\255\255\012\001\031\001\032\001\255\255\016\001\ \017\001\001\001\255\255\255\255\039\001\255\255\023\001\007\001\ \008\001\026\001\027\001\028\001\012\001\255\255\031\001\032\001\ \016\001\017\001\001\001\255\255\255\255\255\255\039\001\023\001\ \007\001\255\255\026\001\027\001\028\001\012\001\255\255\031\001\ \032\001\016\001\017\001\255\255\255\255\255\255\255\255\039\001\ \023\001\255\255\255\255\026\001\027\001\028\001\255\255\255\255\ \031\001\032\001\255\255\255\255\255\255\255\255\255\255\255\255\ \039\001" let yynames_const = "\ AND\000\ ARRAY\000\ ASSIGN\000\ BREAK\000\ COLON\000\ COMMA\000\ DIVIDE\000\ DO\000\ DOT\000\ ELSE\000\ END\000\ EOF\000\ EQ\000\ EXCEPTION\000\ FOR\000\ FUNCTION\000\ GE\000\ GT\000\ HANDLE\000\ IF\000\ IN\000\ LBRACE\000\ LBRACK\000\ LE\000\ LET\000\ LPAREN\000\ LT\000\ MINUS\000\ NEQ\000\ NIL\000\ OF\000\ OR\000\ PLUS\000\ RAISE\000\ RBRACE\000\ RBRACK\000\ RPAREN\000\ SEMICOLON\000\ SPAWN\000\ TIMES\000\ THEN\000\ TO\000\ TRY\000\ TYPE\000\ VAR\000\ WHILE\000\ " let yynames_block = "\ INT\000\ ID\000\ STRING\000\ " let yyact = [| (fun _ -> failwith "parser") ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : Ast.exp) in Obj.repr( # 85 "parser.mly" ( _1 ) # 665 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : Ast.var) in Obj.repr( # 88 "parser.mly" ( mkVarExp _1 ) # 672 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'sequence) in Obj.repr( # 89 "parser.mly" ( mkSeqExp _1 ) # 679 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'literal) in Obj.repr( # 90 "parser.mly" ( _1 ) # 686 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'function_call) in Obj.repr( # 91 "parser.mly" ( _1 ) # 693 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'arithmetic) in Obj.repr( # 92 "parser.mly" ( _1 ) # 700 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'comparison) in Obj.repr( # 93 "parser.mly" ( _1 ) # 707 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'boolean) in Obj.repr( # 94 "parser.mly" ( _1 ) # 714 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'construction) in Obj.repr( # 95 "parser.mly" ( _1 ) # 721 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.var) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 96 "parser.mly" ( mkAssignExp _1 _3 ) # 729 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'if_statement) in Obj.repr( # 97 "parser.mly" ( _1 ) # 736 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'loop_statement) in Obj.repr( # 98 "parser.mly" ( _1 ) # 743 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 3 : Ast.dec list) in let _4 = (Parsing.peek_val __caml_parser_env 1 : 'expr_list) in Obj.repr( # 99 "parser.mly" ( mkLetExp _2 (mkSeqExp _4) ) # 751 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 1 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'handlers) in Obj.repr( # 100 "parser.mly" ( mkTryExp _2 (List.rev _3) ) # 759 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 0 : 'id) in Obj.repr( # 101 "parser.mly" ( mkRaise _2 ) # 766 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 0 : 'id) in Obj.repr( # 102 "parser.mly" ( mkSpawn _2 ) # 773 "parser.ml" : Ast.exp)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in Obj.repr( # 106 "parser.mly" ( S.symbol _1 ) # 780 "parser.ml" : 'id)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'id) in Obj.repr( # 112 "parser.mly" ( mkSimpleVar _1 ) # 787 "parser.ml" : Ast.var)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : 'id) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'id) in Obj.repr( # 113 "parser.mly" ( mkFieldVar (mkSimpleVar _1) _3 ) # 795 "parser.ml" : Ast.var)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 3 : 'id) in let _3 = (Parsing.peek_val __caml_parser_env 1 : Ast.exp) in Obj.repr( # 114 "parser.mly" ( mkSubscriptVar (mkSimpleVar _1) _3 ) # 803 "parser.ml" : Ast.var)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.var) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'id) in Obj.repr( # 115 "parser.mly" ( mkFieldVar _1 _3 ) # 811 "parser.ml" : Ast.var)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 3 : Ast.var) in let _3 = (Parsing.peek_val __caml_parser_env 1 : Ast.exp) in Obj.repr( # 116 "parser.mly" ( mkSubscriptVar _1 _3 ) # 819 "parser.ml" : Ast.var)) ; (fun __caml_parser_env -> Obj.repr( # 121 "parser.mly" ( [] ) # 825 "parser.ml" : 'sequence)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 1 : 'expr_list) in Obj.repr( # 122 "parser.mly" ( _2 ) # 832 "parser.ml" : 'sequence)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 125 "parser.mly" ( _1 :: [] ) # 839 "parser.ml" : 'expr_list)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'expr_list) in Obj.repr( # 126 "parser.mly" ( _1 :: _3 ) # 847 "parser.ml" : 'expr_list)) ; (fun __caml_parser_env -> Obj.repr( # 131 "parser.mly" ( mkNilExp ) # 853 "parser.ml" : 'literal)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : int) in Obj.repr( # 132 "parser.mly" ( mkIntExp _1 ) # 860 "parser.ml" : 'literal)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in Obj.repr( # 133 "parser.mly" ( mkStringExp _1 ) # 867 "parser.ml" : 'literal)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 3 : 'id) in let _3 = (Parsing.peek_val __caml_parser_env 1 : 'fun_args) in Obj.repr( # 138 "parser.mly" ( mkCallExp _1 _3 ) # 875 "parser.ml" : 'function_call)) ; (fun __caml_parser_env -> Obj.repr( # 141 "parser.mly" ( [] ) # 881 "parser.ml" : 'fun_args)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 142 "parser.mly" ( _1 :: [] ) # 888 "parser.ml" : 'fun_args)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'fun_args) in Obj.repr( # 143 "parser.mly" ( _1 :: _3 ) # 896 "parser.ml" : 'fun_args)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 148 "parser.mly" ( mkOpExp (mkIntExp 0) _2 A.MinusOp ) # 903 "parser.ml" : 'arithmetic)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 149 "parser.mly" ( mkOpExp _1 _3 A.PlusOp ) # 911 "parser.ml" : 'arithmetic)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 150 "parser.mly" ( mkOpExp _1 _3 A.MinusOp ) # 919 "parser.ml" : 'arithmetic)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 151 "parser.mly" ( mkOpExp _1 _3 A.TimesOp ) # 927 "parser.ml" : 'arithmetic)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 152 "parser.mly" ( mkOpExp _1 _3 A.DivideOp ) # 935 "parser.ml" : 'arithmetic)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 157 "parser.mly" ( mkOpExp _1 _3 A.EqOp ) # 943 "parser.ml" : 'comparison)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 158 "parser.mly" ( mkOpExp _1 _3 A.NeqOp ) # 951 "parser.ml" : 'comparison)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 159 "parser.mly" ( mkOpExp _1 _3 A.GtOp ) # 959 "parser.ml" : 'comparison)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 160 "parser.mly" ( mkOpExp _1 _3 A.LtOp ) # 967 "parser.ml" : 'comparison)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 161 "parser.mly" ( mkOpExp _1 _3 A.GeOp ) # 975 "parser.ml" : 'comparison)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 162 "parser.mly" ( mkOpExp _1 _3 A.LeOp ) # 983 "parser.ml" : 'comparison)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 167 "parser.mly" ( mkIfExp _1 _3 (Some(mkIntExp 0)) ) # 991 "parser.ml" : 'boolean)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 168 "parser.mly" ( mkIfExp _1 (mkIntExp 1) (Some _3) ) # 999 "parser.ml" : 'boolean)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 3 : 'id) in let _3 = (Parsing.peek_val __caml_parser_env 1 : 'ctor_list) in Obj.repr( # 173 "parser.mly" ( mkRecExp _1 _3 ) # 1007 "parser.ml" : 'construction)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 5 : 'id) in let _3 = (Parsing.peek_val __caml_parser_env 3 : Ast.exp) in let _6 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 174 "parser.mly" ( mkArrayExp _1 _3 _6 ) # 1016 "parser.ml" : 'construction)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : 'id) in let _3 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 177 "parser.mly" ( (mkRecFld _1 _3) :: [] ) # 1024 "parser.ml" : 'ctor_list)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 4 : 'id) in let _3 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _5 = (Parsing.peek_val __caml_parser_env 0 : 'ctor_list) in Obj.repr( # 178 "parser.mly" ( (mkRecFld _1 _3) :: _5 ) # 1033 "parser.ml" : 'ctor_list)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _4 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 183 "parser.mly" ( mkIfExp _2 _4 None ) # 1041 "parser.ml" : 'if_statement)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 4 : Ast.exp) in let _4 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _6 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 184 "parser.mly" ( mkIfExp _2 _4 (Some _6) ) # 1050 "parser.ml" : 'if_statement)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _4 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 189 "parser.mly" ( mkWhileExp _2 _4 ) # 1058 "parser.ml" : 'loop_statement)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 6 : 'id) in let _4 = (Parsing.peek_val __caml_parser_env 4 : Ast.exp) in let _6 = (Parsing.peek_val __caml_parser_env 2 : Ast.exp) in let _8 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 190 "parser.mly" ( mkForExp _2 _4 _6 _8 ) # 1068 "parser.ml" : 'loop_statement)) ; (fun __caml_parser_env -> Obj.repr( # 191 "parser.mly" ( mkBreakExp ) # 1074 "parser.ml" : 'loop_statement)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 2 : 'id) in let _3 = (Parsing.peek_val __caml_parser_env 1 : Ast.exp) in Obj.repr( # 196 "parser.mly" ( mkHandler _2 _3 ) # 1082 "parser.ml" : 'handler)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'handler) in Obj.repr( # 199 "parser.mly" ( _1 :: [] ) # 1089 "parser.ml" : 'handlers)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'handler) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'handlers) in Obj.repr( # 200 "parser.mly" ( _1 :: _2 ) # 1097 "parser.ml" : 'handlers)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'dec) in Obj.repr( # 215 "parser.mly" ( _1 :: [] ) # 1104 "parser.ml" : Ast.dec list)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'dec) in let _2 = (Parsing.peek_val __caml_parser_env 0 : Ast.dec list) in Obj.repr( # 216 "parser.mly" ( _1 :: _2 ) # 1112 "parser.ml" : Ast.dec list)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'var_dec) in Obj.repr( # 219 "parser.mly" ( _1 ) # 1119 "parser.ml" : 'dec)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_decs) in Obj.repr( # 220 "parser.mly" ( mkTypeDec _1 ) # 1126 "parser.ml" : 'dec)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'fun_decs) in Obj.repr( # 221 "parser.mly" ( mkFunctionDec _1 ) # 1133 "parser.ml" : 'dec)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'exn_dec) in Obj.repr( # 222 "parser.mly" ( _1 ) # 1140 "parser.ml" : 'dec)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 2 : 'id) in let _4 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 225 "parser.mly" ( mkVarDec _2 None _4 ) # 1148 "parser.ml" : 'var_dec)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 4 : 'id) in let _4 = (Parsing.peek_val __caml_parser_env 2 : 'id) in let _6 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 226 "parser.mly" ( mkVarDec _2 (Some _4) _6 ) # 1157 "parser.ml" : 'var_dec)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'type_dec) in Obj.repr( # 229 "parser.mly" ( _1 :: [] ) # 1164 "parser.ml" : 'type_decs)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'type_dec) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'type_decs) in Obj.repr( # 230 "parser.mly" ( _1 :: _2 ) # 1172 "parser.ml" : 'type_decs)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 2 : 'id) in let _4 = (Parsing.peek_val __caml_parser_env 0 : 'ty) in Obj.repr( # 233 "parser.mly" ( mkTyDec _2 _4 ) # 1180 "parser.ml" : 'type_dec)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'id) in Obj.repr( # 236 "parser.mly" ( mkNameTy _1 ) # 1187 "parser.ml" : 'ty)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 1 : 'ty_fields) in Obj.repr( # 237 "parser.mly" ( mkRecordTy _2 ) # 1194 "parser.ml" : 'ty)) ; (fun __caml_parser_env -> let _3 = (Parsing.peek_val __caml_parser_env 0 : 'id) in Obj.repr( # 238 "parser.mly" ( mkArrayTy _3 ) # 1201 "parser.ml" : 'ty)) ; (fun __caml_parser_env -> Obj.repr( # 241 "parser.mly" ( [] ) # 1207 "parser.ml" : 'ty_fields)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 2 : 'id) in let _3 = (Parsing.peek_val __caml_parser_env 0 : 'id) in Obj.repr( # 242 "parser.mly" ( (mkField _1 _3) :: [] ) # 1215 "parser.ml" : 'ty_fields)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 4 : 'id) in let _3 = (Parsing.peek_val __caml_parser_env 2 : 'id) in let _5 = (Parsing.peek_val __caml_parser_env 0 : 'ty_fields) in Obj.repr( # 243 "parser.mly" ( (mkField _1 _3) :: _5 ) # 1224 "parser.ml" : 'ty_fields)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 0 : 'fun_dec) in Obj.repr( # 246 "parser.mly" ( _1 :: [] ) # 1231 "parser.ml" : 'fun_decs)) ; (fun __caml_parser_env -> let _1 = (Parsing.peek_val __caml_parser_env 1 : 'fun_dec) in let _2 = (Parsing.peek_val __caml_parser_env 0 : 'fun_decs) in Obj.repr( # 247 "parser.mly" ( _1 :: _2 ) # 1239 "parser.ml" : 'fun_decs)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 5 : 'id) in let _4 = (Parsing.peek_val __caml_parser_env 3 : 'ty_fields) in let _7 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 251 "parser.mly" ( mkFunDec _2 _4 None _7 ) # 1248 "parser.ml" : 'fun_dec)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 7 : 'id) in let _4 = (Parsing.peek_val __caml_parser_env 5 : 'ty_fields) in let _7 = (Parsing.peek_val __caml_parser_env 2 : 'id) in let _9 = (Parsing.peek_val __caml_parser_env 0 : Ast.exp) in Obj.repr( # 253 "parser.mly" ( mkFunDec _2 _4 (Some _7) _9 ) # 1258 "parser.ml" : 'fun_dec)) ; (fun __caml_parser_env -> let _2 = (Parsing.peek_val __caml_parser_env 0 : 'id) in Obj.repr( # 256 "parser.mly" ( mkException _2 ) # 1265 "parser.ml" : 'exn_dec)) (* Entry program *) ; (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 program (lexfun : Lexing.lexbuf -> token) (lexbuf : Lexing.lexbuf) = (Parsing.yyparse yytables 1 lexfun lexbuf : Ast.exp)