- | Sys.Break -> MatitaLog.error "user break!"; go ()
- | MatitaTypes.Command_error _ -> go ()
- | CicTextualParser2.Parse_error (floc,err) ->
- (* check for EOI *)
- if Stream.peek str = None then
- exit 0
- else
- let (x, y) = CicAst.loc_of_floc floc in
- MatitaLog.error (sprintf "Parse error at %d-%d: %s" x y err);
- go ()
- | exn -> MatitaLog.error (Printexc.to_string exn); go ()
-
-let main ~mode =
- Helm_registry.load_from "matita.conf.xml";
+ | Sys.Break -> MatitaLog.error "user break!"; interactive_loop ()
+ | MatitaTypes.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
+ MatitaLog.error (sprintf "Parse error at %d-%d: %s" x y err);
+ interactive_loop ()
+ | exn -> MatitaLog.error (Printexc.to_string exn); interactive_loop ()
+
+let go () =
+ Helm_registry.load_from BuildTimeConf.matita_conf;
+ CicNotation.load_notation BuildTimeConf.core_notation_script;