Commit ed224b2a authored by POTTIER Francois's avatar POTTIER Francois

Update the expected test output.

parent fbbbac18
...@@ -22,224 +22,214 @@ include MenhirBasics ...@@ -22,224 +22,214 @@ include MenhirBasics
let _eRR = let _eRR =
MenhirBasics.Error MenhirBasics.Error
type _menhir_env = { type _menhir_state =
_menhir_lexer: Lexing.lexbuf -> token;
_menhir_lexbuf: Lexing.lexbuf;
_menhir_token: token
}
and _menhir_state =
| MenhirState7 | MenhirState7
| MenhirState4 | MenhirState4
| MenhirState1 | MenhirState1
| MenhirState0 | MenhirState0
let rec main : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (int) = let rec main : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> (int) =
fun lexer lexbuf -> fun _menhir_lexer _menhir_lexbuf ->
let _menhir_env = { let _menhir_token = Obj.magic () in
_menhir_lexer = lexer; Obj.magic (_menhir_run0 _menhir_lexer _menhir_lexbuf _menhir_token ((), _menhir_lexbuf.Lexing.lex_curr_p))
_menhir_lexbuf = lexbuf;
_menhir_token = Obj.magic ();
} in
Obj.magic (_menhir_run0 _menhir_env ((), _menhir_env._menhir_lexbuf.Lexing.lex_curr_p))
and _menhir_run11 : _menhir_env -> 'ttv_tail * _menhir_state * (int) -> 'ttv_return = and _menhir_run11 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> 'ttv_tail * _menhir_state * (int) -> 'ttv_return =
fun _menhir_env _menhir_stack -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack ->
(* State 11: *) (* State 11: *)
(* Not allocating top stack cell *) (* Not allocating top stack cell *)
(* Reducing without looking ahead at # *) (* Reducing without looking ahead at # *)
_menhir_reduce5 _menhir_env (Obj.magic _menhir_stack) _menhir_reduce5 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
and _menhir_run10 : _menhir_env -> 'ttv_tail * _menhir_state * (int) -> 'ttv_return = and _menhir_run10 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> 'ttv_tail * _menhir_state * (int) -> 'ttv_return =
fun _menhir_env _menhir_stack -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack ->
(* State 10: *) (* State 10: *)
match _menhir_env._menhir_token with match _menhir_token with
| EOL -> | EOL ->
(* Shifting (EOL) to state 11 *) (* Shifting (EOL) to state 11 *)
_menhir_run11 _menhir_env (Obj.magic _menhir_stack) _menhir_run11 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
| PLUS -> | PLUS ->
(* Shifting (PLUS) to state 7 *) (* Shifting (PLUS) to state 7 *)
_menhir_run7 _menhir_env (Obj.magic _menhir_stack) _menhir_run7 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
| TIMES -> | TIMES ->
(* Shifting (TIMES) to state 4 *) (* Shifting (TIMES) to state 4 *)
_menhir_run4 _menhir_env (Obj.magic _menhir_stack) _menhir_run4 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
| _ -> | _ ->
_menhir_error () _menhir_error ()
and _menhir_run9 : _menhir_env -> 'ttv_tail -> _menhir_state -> (int) -> 'ttv_return = and _menhir_run9 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> 'ttv_tail -> _menhir_state -> (int) -> 'ttv_return =
fun _menhir_env _menhir_stack _menhir_s _v -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack _menhir_s _v ->
(* State 9: *) (* State 9: *)
(* Not allocating top stack cell *) (* Not allocating top stack cell *)
(* Reducing without looking ahead at # *) (* Reducing without looking ahead at # *)
_menhir_reduce0 _menhir_env (Obj.magic _menhir_stack) _menhir_s _v _menhir_reduce0 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack) _menhir_s _v
and _menhir_run8 : _menhir_env -> (('ttv_tail * _menhir_state * (int))) * _menhir_state * (int) -> 'ttv_return = and _menhir_run8 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> (('ttv_tail * _menhir_state * (int))) * _menhir_state * (int) -> 'ttv_return =
fun _menhir_env _menhir_stack -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack ->
(* State 8: *) (* State 8: *)
match _menhir_env._menhir_token with match _menhir_token with
| TIMES -> | TIMES ->
(* Shifting (TIMES) to state 4 *) (* Shifting (TIMES) to state 4 *)
_menhir_run4 _menhir_env (Obj.magic _menhir_stack) _menhir_run4 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
| EOL | PLUS | RPAREN -> | EOL | PLUS | RPAREN ->
_menhir_reduce3 _menhir_env (Obj.magic _menhir_stack) _menhir_reduce3 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
| _ -> | _ ->
_menhir_error () _menhir_error ()
and _menhir_run7 : _menhir_env -> 'ttv_tail * _menhir_state * (int) -> 'ttv_return = and _menhir_run7 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> 'ttv_tail * _menhir_state * (int) -> 'ttv_return =
fun _menhir_env _menhir_stack -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack ->
(* State 7: *) (* State 7: *)
let _menhir_env = _menhir_discard _menhir_env in let _menhir_token = _menhir_lexer _menhir_lexbuf in
match _menhir_env._menhir_token with match _menhir_token with
| INT _v -> | INT _v ->
(* Shifting (INT) to state 2 *) (* Shifting (INT) to state 2 *)
_menhir_run2 _menhir_env (Obj.magic _menhir_stack) MenhirState7 _v _menhir_run2 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack) MenhirState7 _v
| LPAREN -> | LPAREN ->
(* Shifting (LPAREN) to state 1 *) (* Shifting (LPAREN) to state 1 *)
_menhir_run1 _menhir_env (Obj.magic _menhir_stack) MenhirState7 _menhir_run1 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack) MenhirState7
| _ -> | _ ->
_menhir_error () _menhir_error ()
and _menhir_run6 : _menhir_env -> ('ttv_tail * _menhir_state) * _menhir_state * (int) -> 'ttv_return = and _menhir_run6 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> ('ttv_tail * _menhir_state) * _menhir_state * (int) -> 'ttv_return =
fun _menhir_env _menhir_stack -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack ->
(* State 6: *) (* State 6: *)
(* Not allocating top stack cell *) (* Not allocating top stack cell *)
let _menhir_env = _menhir_discard _menhir_env in let _menhir_token = _menhir_lexer _menhir_lexbuf in
(* Reducing without looking ahead at EOL | PLUS | RPAREN | TIMES *) (* Reducing without looking ahead at EOL | PLUS | RPAREN | TIMES *)
_menhir_reduce2 _menhir_env (Obj.magic _menhir_stack) _menhir_reduce2 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
and _menhir_run5 : _menhir_env -> (('ttv_tail * _menhir_state * (int))) * _menhir_state * (int) -> 'ttv_return = and _menhir_run5 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> (('ttv_tail * _menhir_state * (int))) * _menhir_state * (int) -> 'ttv_return =
fun _menhir_env _menhir_stack -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack ->
(* State 5: *) (* State 5: *)
(* Reducing without looking ahead at EOL | PLUS | RPAREN | TIMES *) (* Reducing without looking ahead at EOL | PLUS | RPAREN | TIMES *)
_menhir_reduce4 _menhir_env (Obj.magic _menhir_stack) _menhir_reduce4 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
and _menhir_run4 : _menhir_env -> 'ttv_tail * _menhir_state * (int) -> 'ttv_return = and _menhir_run4 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> 'ttv_tail * _menhir_state * (int) -> 'ttv_return =
fun _menhir_env _menhir_stack -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack ->
(* State 4: *) (* State 4: *)
let _menhir_env = _menhir_discard _menhir_env in let _menhir_token = _menhir_lexer _menhir_lexbuf in
match _menhir_env._menhir_token with match _menhir_token with
| INT _v -> | INT _v ->
(* Shifting (INT) to state 2 *) (* Shifting (INT) to state 2 *)
_menhir_run2 _menhir_env (Obj.magic _menhir_stack) MenhirState4 _v _menhir_run2 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack) MenhirState4 _v
| LPAREN -> | LPAREN ->
(* Shifting (LPAREN) to state 1 *) (* Shifting (LPAREN) to state 1 *)
_menhir_run1 _menhir_env (Obj.magic _menhir_stack) MenhirState4 _menhir_run1 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack) MenhirState4
| _ -> | _ ->
_menhir_error () _menhir_error ()
and _menhir_run3 : _menhir_env -> ('ttv_tail * _menhir_state) * _menhir_state * (int) -> 'ttv_return = and _menhir_run3 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> ('ttv_tail * _menhir_state) * _menhir_state * (int) -> 'ttv_return =
fun _menhir_env _menhir_stack -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack ->
(* State 3: *) (* State 3: *)
match _menhir_env._menhir_token with match _menhir_token with
| PLUS -> | PLUS ->
(* Shifting (PLUS) to state 7 *) (* Shifting (PLUS) to state 7 *)
_menhir_run7 _menhir_env (Obj.magic _menhir_stack) _menhir_run7 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
| RPAREN -> | RPAREN ->
(* Shifting (RPAREN) to state 6 *) (* Shifting (RPAREN) to state 6 *)
_menhir_run6 _menhir_env (Obj.magic _menhir_stack) _menhir_run6 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
| TIMES -> | TIMES ->
(* Shifting (TIMES) to state 4 *) (* Shifting (TIMES) to state 4 *)
_menhir_run4 _menhir_env (Obj.magic _menhir_stack) _menhir_run4 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
| _ -> | _ ->
_menhir_error () _menhir_error ()
and _menhir_run2 : _menhir_env -> 'ttv_tail -> _menhir_state -> ( and _menhir_run2 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> 'ttv_tail -> _menhir_state -> (
# 1 "demos/calc-mini/parser.mly" # 1 "demos/calc-mini/parser.mly"
(int) (int)
# 150 "demos/calc-mini/parser.ml" # 140 "demos/calc-mini/parser.ml"
) -> 'ttv_return = ) -> 'ttv_return =
fun _menhir_env _menhir_stack _menhir_s _v -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack _menhir_s _v ->
(* State 2: *) (* State 2: *)
(* Not allocating top stack cell *) (* Not allocating top stack cell *)
let _menhir_env = _menhir_discard _menhir_env in let _menhir_token = _menhir_lexer _menhir_lexbuf in
(* Reducing without looking ahead at EOL | PLUS | RPAREN | TIMES *) (* Reducing without looking ahead at EOL | PLUS | RPAREN | TIMES *)
_menhir_reduce1 _menhir_env (Obj.magic _menhir_stack) _menhir_s _v _menhir_reduce1 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack) _menhir_s _v
and _menhir_run1 : _menhir_env -> 'ttv_tail -> _menhir_state -> 'ttv_return = and _menhir_run1 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> 'ttv_tail -> _menhir_state -> 'ttv_return =
fun _menhir_env _menhir_stack _menhir_s -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack _menhir_s ->
(* State 1: *) (* State 1: *)
let _menhir_stack = (_menhir_stack, _menhir_s) in let _menhir_stack = (_menhir_stack, _menhir_s) in
let _menhir_env = _menhir_discard _menhir_env in let _menhir_token = _menhir_lexer _menhir_lexbuf in
match _menhir_env._menhir_token with match _menhir_token with
| INT _v -> | INT _v ->
(* Shifting (INT) to state 2 *) (* Shifting (INT) to state 2 *)
_menhir_run2 _menhir_env (Obj.magic _menhir_stack) MenhirState1 _v _menhir_run2 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack) MenhirState1 _v
| LPAREN -> | LPAREN ->
(* Shifting (LPAREN) to state 1 *) (* Shifting (LPAREN) to state 1 *)
_menhir_run1 _menhir_env (Obj.magic _menhir_stack) MenhirState1 _menhir_run1 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack) MenhirState1
| _ -> | _ ->
_menhir_error () _menhir_error ()
and _menhir_run0 : _menhir_env -> 'ttv_tail -> 'ttv_return = and _menhir_run0 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> 'ttv_tail -> 'ttv_return =
fun _menhir_env _menhir_stack -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack ->
(* State 0: *) (* State 0: *)
let _menhir_env = _menhir_discard _menhir_env in let _menhir_token = _menhir_lexer _menhir_lexbuf in
match _menhir_env._menhir_token with match _menhir_token with
| INT _v -> | INT _v ->
(* Shifting (INT) to state 2 *) (* Shifting (INT) to state 2 *)
_menhir_run2 _menhir_env (Obj.magic _menhir_stack) MenhirState0 _v _menhir_run2 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack) MenhirState0 _v
| LPAREN -> | LPAREN ->
(* Shifting (LPAREN) to state 1 *) (* Shifting (LPAREN) to state 1 *)
_menhir_run1 _menhir_env (Obj.magic _menhir_stack) MenhirState0 _menhir_run1 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack) MenhirState0
| _ -> | _ ->
_menhir_error () _menhir_error ()
and _menhir_goto_expr : _menhir_env -> 'ttv_tail -> _menhir_state -> (int) -> 'ttv_return = and _menhir_goto_expr : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> 'ttv_tail -> _menhir_state -> (int) -> 'ttv_return =
fun _menhir_env _menhir_stack _menhir_s _v -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack _menhir_s _v ->
let _menhir_stack = (_menhir_stack, _menhir_s, _v) in let _menhir_stack = (_menhir_stack, _menhir_s, _v) in
match _menhir_s with match _menhir_s with
| MenhirState1 -> | MenhirState1 ->
_menhir_run3 _menhir_env (Obj.magic _menhir_stack) _menhir_run3 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
| MenhirState4 -> | MenhirState4 ->
_menhir_run5 _menhir_env (Obj.magic _menhir_stack) _menhir_run5 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
| MenhirState7 -> | MenhirState7 ->
_menhir_run8 _menhir_env (Obj.magic _menhir_stack) _menhir_run8 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
| MenhirState0 -> | MenhirState0 ->
_menhir_run10 _menhir_env (Obj.magic _menhir_stack) _menhir_run10 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack)
and _menhir_goto_main : _menhir_env -> 'ttv_tail -> _menhir_state -> (int) -> 'ttv_return = and _menhir_goto_main : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> 'ttv_tail -> _menhir_state -> (int) -> 'ttv_return =
fun _menhir_env _menhir_stack _menhir_s _v -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack _menhir_s _v ->
(* State should be MenhirState0 *) (* State should be MenhirState0 *)
_menhir_run9 _menhir_env (Obj.magic _menhir_stack) _menhir_s _v _menhir_run9 _menhir_lexer _menhir_lexbuf _menhir_token (Obj.magic _menhir_stack) _menhir_s _v
and _menhir_reduce5 : _menhir_env -> 'ttv_tail * _menhir_state * (int) -> 'ttv_return = and _menhir_reduce5 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> 'ttv_tail * _menhir_state * (int) -> 'ttv_return =
fun _menhir_env _menhir_stack -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack ->
(* Reducing production main -> expr EOL *) (* Reducing production main -> expr EOL *)
let (_menhir_stack, _menhir_s, (e : (int))) = _menhir_stack in let (_menhir_stack, _menhir_s, (e : (int))) = _menhir_stack in
let _2 = () in let _2 = () in
let _v : (int) = let _v : (int) =
# 15 "demos/calc-mini/parser.mly" # 15 "demos/calc-mini/parser.mly"
( e ) ( e )
# 214 "demos/calc-mini/parser.ml" # 204 "demos/calc-mini/parser.ml"
in in
_menhir_goto_main _menhir_env _menhir_stack _menhir_s _v _menhir_goto_main _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack _menhir_s _v
and _menhir_reduce4 : _menhir_env -> (('ttv_tail * _menhir_state * (int))) * _menhir_state * (int) -> 'ttv_return = and _menhir_reduce4 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> (('ttv_tail * _menhir_state * (int))) * _menhir_state * (int) -> 'ttv_return =
fun _menhir_env _menhir_stack -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack ->
(* Reducing production expr -> expr TIMES expr *) (* Reducing production expr -> expr TIMES expr *)
let ((_menhir_stack, _menhir_s, (e1 : (int))), _, (e2 : (int))) = _menhir_stack in let ((_menhir_stack, _menhir_s, (e1 : (int))), _, (e2 : (int))) = _menhir_stack in
let _2 = () in let _2 = () in
let _v : (int) = let _v : (int) =
# 25 "demos/calc-mini/parser.mly" # 25 "demos/calc-mini/parser.mly"
( e1 * e2 ) ( e1 * e2 )
# 226 "demos/calc-mini/parser.ml" # 216 "demos/calc-mini/parser.ml"
in in
_menhir_goto_expr _menhir_env _menhir_stack _menhir_s _v _menhir_goto_expr _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack _menhir_s _v
and _menhir_reduce3 : _menhir_env -> (('ttv_tail * _menhir_state * (int))) * _menhir_state * (int) -> 'ttv_return = and _menhir_reduce3 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> (('ttv_tail * _menhir_state * (int))) * _menhir_state * (int) -> 'ttv_return =
fun _menhir_env _menhir_stack -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack ->
(* Reducing production expr -> expr PLUS expr *) (* Reducing production expr -> expr PLUS expr *)
let ((_menhir_stack, _menhir_s, (e1 : (int))), _, (e2 : (int))) = _menhir_stack in let ((_menhir_stack, _menhir_s, (e1 : (int))), _, (e2 : (int))) = _menhir_stack in
let _2 = () in let _2 = () in
let _v : (int) = let _v : (int) =
# 23 "demos/calc-mini/parser.mly" # 23 "demos/calc-mini/parser.mly"
( e1 + e2 ) ( e1 + e2 )
# 238 "demos/calc-mini/parser.ml" # 228 "demos/calc-mini/parser.ml"
in in
_menhir_goto_expr _menhir_env _menhir_stack _menhir_s _v _menhir_goto_expr _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack _menhir_s _v
and _menhir_reduce2 : _menhir_env -> ('ttv_tail * _menhir_state) * _menhir_state * (int) -> 'ttv_return = and _menhir_reduce2 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> ('ttv_tail * _menhir_state) * _menhir_state * (int) -> 'ttv_return =
fun _menhir_env _menhir_stack -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack ->
(* Reducing production expr -> LPAREN expr RPAREN *) (* Reducing production expr -> LPAREN expr RPAREN *)
let ((_menhir_stack, _menhir_s), _, (e : (int))) = _menhir_stack in let ((_menhir_stack, _menhir_s), _, (e : (int))) = _menhir_stack in
let _3 = () in let _3 = () in
...@@ -247,44 +237,33 @@ and _menhir_reduce2 : _menhir_env -> ('ttv_tail * _menhir_state) * _menhir_state ...@@ -247,44 +237,33 @@ and _menhir_reduce2 : _menhir_env -> ('ttv_tail * _menhir_state) * _menhir_state
let _v : (int) = let _v : (int) =
# 21 "demos/calc-mini/parser.mly" # 21 "demos/calc-mini/parser.mly"
( e ) ( e )
# 251 "demos/calc-mini/parser.ml" # 241 "demos/calc-mini/parser.ml"
in in
_menhir_goto_expr _menhir_env _menhir_stack _menhir_s _v _menhir_goto_expr _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack _menhir_s _v
and _menhir_reduce1 : _menhir_env -> 'ttv_tail -> _menhir_state -> ( and _menhir_reduce1 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> 'ttv_tail -> _menhir_state -> (
# 1 "demos/calc-mini/parser.mly" # 1 "demos/calc-mini/parser.mly"
(int) (int)
# 258 "demos/calc-mini/parser.ml" # 248 "demos/calc-mini/parser.ml"
) -> 'ttv_return = ) -> 'ttv_return =
fun _menhir_env _menhir_stack _menhir_s (i : ( fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack _menhir_s (i : (
# 1 "demos/calc-mini/parser.mly" # 1 "demos/calc-mini/parser.mly"
(int) (int)
# 263 "demos/calc-mini/parser.ml" # 253 "demos/calc-mini/parser.ml"
)) -> )) ->
(* Reducing production expr -> INT *) (* Reducing production expr -> INT *)
let _v : (int) = let _v : (int) =
# 19 "demos/calc-mini/parser.mly" # 19 "demos/calc-mini/parser.mly"
( i ) ( i )
# 269 "demos/calc-mini/parser.ml" # 259 "demos/calc-mini/parser.ml"
in in
_menhir_goto_expr _menhir_env _menhir_stack _menhir_s _v _menhir_goto_expr _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack _menhir_s _v
and _menhir_reduce0 : _menhir_env -> 'ttv_tail -> _menhir_state -> (int) -> 'ttv_return = and _menhir_reduce0 : (Lexing.lexbuf -> token) -> Lexing.lexbuf -> token -> 'ttv_tail -> _menhir_state -> (int) -> 'ttv_return =
fun _menhir_env _menhir_stack _menhir_s (_1 : (int)) -> fun _menhir_lexer _menhir_lexbuf _menhir_token _menhir_stack _menhir_s (_1 : (int)) ->
(* Accepting *) (* Accepting *)
Obj.magic _1 Obj.magic _1
and _menhir_discard : _menhir_env -> _menhir_env =
fun _menhir_env ->
let lexer = _menhir_env._menhir_lexer in
let lexbuf = _menhir_env._menhir_lexbuf in
let token = lexer lexbuf in
{
_menhir_lexer = lexer;
_menhir_lexbuf = lexbuf;
_menhir_token = token;
}
and _menhir_print_token : token -> string = and _menhir_print_token : token -> string =
fun _tok -> fun _tok ->
match _tok with match _tok with
...@@ -314,4 +293,4 @@ and _menhir_error = ...@@ -314,4 +293,4 @@ and _menhir_error =
# 269 "<standard.mly>" # 269 "<standard.mly>"
# 318 "demos/calc-mini/parser.ml" # 297 "demos/calc-mini/parser.ml"
...@@ -24,13 +24,7 @@ include MenhirBasics ...@@ -24,13 +24,7 @@ include MenhirBasics
let _eRR = let _eRR =
MenhirBasics.Error MenhirBasics.Error
type _menhir_env = { type _menhir_state =
_menhir_lexer: Lexing.lexbuf -> token;
_menhir_lexbuf: Lexing.lexbuf;
_menhir_token: token
}
and _menhir_state =
| MenhirState12 | MenhirState12
| MenhirState10 | MenhirState10
| MenhirState8 | MenhirState8
...@@ -39,99 +33,99 @@ and _menhir_state = ...@@ -39,99 +33,99 @@ and _menhir_state =
| MenhirState1 | MenhirState1
| MenhirState0 | MenhirState0