]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitacLib.ml
merged cic_notation with matita: good luck!
[helm.git] / helm / matita / matitacLib.ml
index 37bb571efd9f3884be655f05c16b4eac9de5488b..076be5416a0e5b6f7d63fb14fd8de9e2a8342563 100644 (file)
@@ -59,7 +59,7 @@ let run_script is eval_function  =
     else 
       fun status stm ->
         (* dump_status status; *)
-        let stm = TacticAstPp.pp_statement stm in
+        let stm = GrafiteAstPp.pp_statement stm in
         let stm = Pcre.replace ~rex:slash_n_RE stm in
         let stm = 
           if String.length stm > 50 then
@@ -73,7 +73,7 @@ let run_script is eval_function  =
     eval_function status is cb
   with
   | MatitaEngine.Drop  
-  | CicTextualParser2.Parse_error _ as exn -> raise exn
+  | CicNotationParser.Parse_error _ as exn -> raise exn
   | exn -> 
       MatitaLog.error (MatitaExcPp.to_string exn);
       raise exn
@@ -119,7 +119,7 @@ let rec interactive_loop () =
   | MatitaEngine.Drop -> pp_ocaml_mode ()
   | Sys.Break -> MatitaLog.error "user break!"; interactive_loop ()
   | MatitaTypes.Command_error _ -> interactive_loop ()
-  | CicTextualParser2.Parse_error (floc,err) ->
+  | CicNotationParser.Parse_error (floc,err) ->
      (* check for EOI *)
      if Stream.peek str = None then
       begin
@@ -127,7 +127,7 @@ let rec interactive_loop () =
        clean_exit (Some 0)
       end
      else
-      let (x, y) = CicAst.loc_of_floc floc in
+      let (x, y) = CicNotationPt.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 ()
@@ -149,6 +149,7 @@ let dump_moo_to_file file moo =
   
 let main ~mode = 
   Helm_registry.load_from BuildTimeConf.matita_conf;
+  CicNotation.load_notation BuildTimeConf.core_notation_script;
   Http_getter.init ();
   MetadataTypes.ownerize_tables (Helm_registry.get "matita.owner");
   MatitaDb.create_owner_environment ();
@@ -218,8 +219,8 @@ let main ~mode =
         clean_exit (Some 1)
       else 
         pp_ocaml_mode ()
-  | CicTextualParser2.Parse_error (floc,err) ->
-     let (x, y) = CicAst.loc_of_floc floc in
+  | CicNotationParser.Parse_error (floc,err) ->
+     let (x, y) = CicNotationPt.loc_of_floc floc in
      MatitaLog.error (sprintf "Parse error at %d-%d: %s" x y err);
      if mode = `COMPILER then
        clean_exit (Some 1)