- | MatitaEngine.Drop -> pp_ocaml_mode ()
- | Sys.Break -> MatitaLog.error "user break!"; interactive_loop ()
- | MatitaTypes.Command_error _ -> interactive_loop ()
- | CicTextualParser2.Parse_error (floc,err) ->
- (* check for EOI *)
- if Stream.peek str = None then
- clean_exit 0
- else
- let (x, y) = CicAst.loc_of_floc floc in
- MatitaLog.error (sprintf "Parse error at %d-%d: %s" x y err);
+ | GrafiteEngine.Drop -> pp_ocaml_mode ()
+ | GrafiteEngine.Macro (floc,_) ->
+ let x, y = HExtlib.loc_of_floc floc in
+ HLog.error
+ (sprintf "A macro has been found in a script at %d-%d" x y);
+ interactive_loop ()
+ | Sys.Break -> HLog.error "user break!"; interactive_loop ()
+ | GrafiteTypes.Command_error _ -> interactive_loop ()
+ | End_of_file ->
+ print_newline ();
+ clean_exit (Some 0)
+ | HExtlib.Localized (floc,CicNotationParser.Parse_error err) ->
+ let x, y = HExtlib.loc_of_floc floc in
+ HLog.error (sprintf "Parse error at %d-%d: %s" x y err);