let yyact = [|
  (fun _ -> failwith "parser")
; (fun __caml_parser_env ->
    Obj.repr(
# 176 "mathparser.mly"
                                (raise Mathcommon.Unit)
# 1038 "mathparser.ml"
               : float))
; (fun __caml_parser_env ->
    Obj.repr(
# 177 "mathparser.mly"
                                (raise Mathcommon.Unit)
# 1044 "mathparser.ml"
               : float))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 1 : 'command) in
    Obj.repr(
# 178 "mathparser.mly"
                                (_2)
# 1051 "mathparser.ml"
               : float))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 1 : 'xp) in
    Obj.repr(
# 179 "mathparser.mly"
                                (_1)
# 1058 "mathparser.ml"
               : float))
; (fun __caml_parser_env ->
    Obj.repr(
# 181 "mathparser.mly"
                                (complain())
# 1064 "mathparser.ml"
               : float))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in
    Obj.repr(
# 186 "mathparser.mly"
                                (
    begin match _1 with

    | ("vars"|"table"->  
      display_bindings ()
    | ("clear"|"erase"->
      Hashtbl.clear local_vars
    | ("exit"|"quit"->
      print_endline "Bye-bye!"; exit 0
    | ("h"|"help"->
      print_endline "Commands: vars, clear, exit."
    | _ -> 
      prerr_endline "Unrecognized command!"

    end ; raise Mathcommon.Unit 
                                )
# 1086 "mathparser.ml"
               : 'command))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'dec) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'decs) in
    Obj.repr(
# 206 "mathparser.mly"
                                (_1)
# 1094 "mathparser.ml"
               : 'decs))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : 'dec) in
    Obj.repr(
# 207 "mathparser.mly"
                                (_1)
# 1101 "mathparser.ml"
               : 'decs))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : string) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 212 "mathparser.mly"
                                (bind_local_var _1 _3)
# 1109 "mathparser.ml"
               : 'dec))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in
    Obj.repr(
# 213 "mathparser.mly"
                                (bind_local_var _1 ((eval_local_var _1) +. 1.))
# 1116 "mathparser.ml"
               : 'dec))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : string) in
    Obj.repr(
# 214 "mathparser.mly"
                                (bind_local_var _2 ((eval_local_var _2) +. 1.))
# 1123 "mathparser.ml"
               : 'dec))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 1 : string) in
    Obj.repr(
# 215 "mathparser.mly"
                                (bind_local_var _1 ((eval_local_var _1) -. 1.))
# 1130 "mathparser.ml"
               : 'dec))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : string) in
    Obj.repr(
# 216 "mathparser.mly"
                                (bind_local_var _2 ((eval_local_var _2) -. 1.))
# 1137 "mathparser.ml"
               : 'dec))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 1 : 'xp) in
    Obj.repr(
# 221 "mathparser.mly"
                                (_2)
# 1144 "mathparser.ml"
               : 'parxp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 1 : 'xp) in
    Obj.repr(
# 222 "mathparser.mly"
                                (_2)
# 1151 "mathparser.ml"
               : 'parxp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 1 : 'xp) in
    Obj.repr(
# 223 "mathparser.mly"
                                (_2)
# 1158 "mathparser.ml"
               : 'parxp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 2 : 'decs) in
    let _4 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 230 "mathparser.mly"
                                (_2;_4)
# 1166 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 1 : 'decs) in
    Obj.repr(
# 231 "mathparser.mly"
                                (_2; raise Mathcommon.Unit)
# 1173 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'decs) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 232 "mathparser.mly"
                                (_1;_3)
# 1181 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 1 : 'decs) in
    Obj.repr(
# 233 "mathparser.mly"
                                (_1; raise Mathcommon.Unit)
# 1188 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    Obj.repr(
# 236 "mathparser.mly"
                                (raise Mathcommon.Unit)
# 1194 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : float) in
    Obj.repr(
# 237 "mathparser.mly"
                                (_1)
# 1201 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : 'parxp) in
    Obj.repr(
# 238 "mathparser.mly"
                                (_1)
# 1208 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 0 : string) in
    Obj.repr(
# 239 "mathparser.mly"
                                (eval_local_var _1)
# 1215 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 1 : 'xp) in
    Obj.repr(
# 240 "mathparser.mly"
                                (abs_float _2)
# 1222 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    Obj.repr(
# 241 "mathparser.mly"
                                (pi)
# 1228 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    Obj.repr(
# 242 "mathparser.mly"
                                (1.)
# 1234 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    Obj.repr(
# 243 "mathparser.mly"
                                (0.)
# 1240 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 244 "mathparser.mly"
                                (10. ** _2)
# 1247 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 247 "mathparser.mly"
                                (_1 *. 10. ** _3)
# 1255 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 248 "mathparser.mly"
                                (_1 +. _3)
# 1263 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 249 "mathparser.mly"
                                (_1 -. _3)
# 1271 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 250 "mathparser.mly"
                                (_1 *. _3)
# 1279 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 251 "mathparser.mly"
                                (_1 /. _3)
# 1287 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 252 "mathparser.mly"
                                (mod_float _1 _3)
# 1295 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 253 "mathparser.mly"
                                (_1 ** _3)
# 1303 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 256 "mathparser.mly"
                                (Random.float _2)
# 1310 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 257 "mathparser.mly"
                                (sqrt _2)
# 1317 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 258 "mathparser.mly"
                                (floor _2)
# 1324 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 259 "mathparser.mly"
                                (ceil _2)
# 1331 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 260 "mathparser.mly"
                                (round _2)
# 1338 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 261 "mathparser.mly"
                                (abs_float _2)
# 1345 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 262 "mathparser.mly"
                                (cos _2)
# 1352 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 263 "mathparser.mly"
                                (sin _2)
# 1359 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 264 "mathparser.mly"
                                (tan _2)
# 1366 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 265 "mathparser.mly"
                                (acos _2)
# 1373 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 266 "mathparser.mly"
                                (asin _2)
# 1380 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 267 "mathparser.mly"
                                (atan _2)
# 1387 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 268 "mathparser.mly"
                                (cosh _2)
# 1394 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 269 "mathparser.mly"
                                (sinh _2)
# 1401 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 270 "mathparser.mly"
                                (tanh _2)
# 1408 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 271 "mathparser.mly"
                                (log _2)
# 1415 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 272 "mathparser.mly"
                                (log10 _2)
# 1422 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 273 "mathparser.mly"
                                (exp _2)
# 1429 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 1 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'parxp) in
    Obj.repr(
# 274 "mathparser.mly"
                                (logb _2 _3)
# 1437 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 275 "mathparser.mly"
                                (deg_to_rad _2)
# 1444 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 276 "mathparser.mly"
                                (factorial_f _2)
# 1451 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 279 "mathparser.mly"
                                (fob (_1 = _3))
# 1459 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 280 "mathparser.mly"
                                (fob (_1 >= _3))
# 1467 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 281 "mathparser.mly"
                                (fob (_1 <= _3))
# 1475 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 282 "mathparser.mly"
                                (fob (_1 > _3))
# 1483 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 283 "mathparser.mly"
                                (fob (_1 < _3))
# 1491 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 284 "mathparser.mly"
                                (fob (bof _1 && bof _3))
# 1499 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 285 "mathparser.mly"
                                (fob (bof _1 || bof _3))
# 1507 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 286 "mathparser.mly"
                                (fxor _1 _3)
# 1515 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 287 "mathparser.mly"
                                (if _2 = 0. then 1. else 0.)
# 1522 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 288 "mathparser.mly"
                                (fob (_1 <> _3))
# 1530 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _1 = (Parsing.peek_val __caml_parser_env 4 : 'xp) in
    let _3 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _5 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 289 "mathparser.mly"
                                (if _1 = 0. then _5 else _3)
# 1539 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 4 : 'xp) in
    let _4 = (Parsing.peek_val __caml_parser_env 2 : 'xp) in
    let _6 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 290 "mathparser.mly"
                                (if _2 = 0. then _6 else _4)
# 1548 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 293 "mathparser.mly"
                                (-._2)
# 1555 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 294 "mathparser.mly"
                                (_2)
# 1562 "mathparser.ml"
               : 'xp))
; (fun __caml_parser_env ->
    let _2 = (Parsing.peek_val __caml_parser_env 0 : 'xp) in
    Obj.repr(
# 297 "mathparser.mly"
                                (let v= _2 in Toolkit.pl (soff v); v)
# 1569 "mathparser.ml"
               : 'xp))
(* Entry evalf *)
; (fun __caml_parser_env -> raise (Parsing.YYexit (Parsing.peek_val __caml_parser_env 0)))
|]