) status projections
(* to avoid a long list of recursive functions *)
-let eval_from_stream_greedy_ref = ref (fun _ _ _ -> assert false);;
+let eval_from_stream_ref = ref (fun _ _ _ -> assert false);;
let eval_command status cmd =
match cmd with
let path = MatitaMisc.obj_file_of_script path in
let stream = Stream.of_channel (open_in path) in
let status = ref status in
- (try
- !eval_from_stream_greedy_ref status stream (fun _ _ -> ())
- with
- CicTextualParser2.Parse_error (floc,err) as exc ->
- (* check for EOI *)
- if Stream.peek stream = None then ()
- else raise exc
- );
+ !eval_from_stream_ref status stream (fun _ _ -> ());
!status
| TacticAst.Set (loc, name, value) ->
let value =
let stl = CicTextualParser2.parse_statements str in
List.iter
(fun ast -> cb !status ast;status := eval_ast !status ast) stl
+;;
+(* to avoid a long list of recursive functions *)
+eval_from_stream_ref := eval_from_stream;;
+
let eval_from_stream_greedy status str cb =
while true do
print_string "matita> ";
done
;;
-(* to avoid a long list of recursive functions *)
-eval_from_stream_greedy_ref := eval_from_stream_greedy;;
-
let eval_string status str =
eval_from_stream status (Stream.of_string str) (fun _ _ -> ())