Modifications mineures du TP Menhir

This commit is contained in:
Adrien Guatto 2023-10-02 09:57:43 +02:00
parent 475b52957b
commit aaed324c5e
4 changed files with 8 additions and 8 deletions

View file

@ -1,2 +1,2 @@
(lang dune 1.4)
(lang dune 1.11)
(using menhir 2.0)

BIN
tp/tp-menhir/code/marthe Executable file

Binary file not shown.

View file

@ -1,11 +1,11 @@
let rec interactive_loop () =
welcome_message ();
let rec loop () =
begin try
try
read () |> eval |> print
with exn ->
Printf.printf "Error: %s\n%!" (Printexc.to_string exn)
end;
with End_of_file -> print_newline ()
| exn ->
Printf.printf "Error: %s\n%!" (Printexc.to_string exn);
loop ()
in
loop ()
@ -18,9 +18,9 @@ and welcome_message () =
"
and read () =
invite (); input_line stdin |> parse
prompt (); input_line stdin |> parse
and invite () =
and prompt () =
Printf.printf "> %!"
and parse input =

Binary file not shown.