let interactive () =
(* Shell mode. Read inputs from stdin and execute them. *)
let prompt () =
Format.printf "> @?" in
let parse_error () = Format.eprintf "Syntax Error\n@?" in
let lb = Lexing.from_channel stdin in
try
while true do
prompt ();
begin try
(* Need to write the command interpreter. *)
raise End_of_file (*
Command.command Lexer.token lb
*)
with
| Parsing.Parse_error -> parse_error ()
end;
print_newline(); flush stdout
done
with
| End_of_file -> Format.printf "\n@?"; exit 0