Commit 3df35f64 authored by Bruno Guillaume's avatar Bruno Guillaume

Remove Univ_grs

parent bcb4735f
......@@ -573,6 +573,7 @@ module Grs = struct
}
let load filename = from_ast filename (Loader.new_grs filename)
let load_old filename = from_ast filename (New_ast.convert (Loader.grs filename))
(* The type [pointed] is a zipper style data structure for resolving names x.y.z *)
type pointed =
......@@ -953,22 +954,3 @@ module Grs = struct
| New_ast.Try (s) -> loop pointed s in
loop (top grs) (Parser.strategy strat)
end
module Univ_grs = struct
let load file =
let new_ast =
try
let ast = Loader.new_grs file in
Log.finfo "[Univ_grs.load] SUCCEED to load file \"%s\" with NEW syntax" file;
ast
with exc_new ->
Log.finfo "[Univ_grs.load] FAILED to load file \"%s\" with NEW syntax: exc=\"%s\"" file (Printexc.to_string exc_new);
try
let ast = New_ast.convert (Loader.grs file) in
Log.finfo "[Univ_grs.load] SUCCEED to load file \"%s\" with OLD syntax" file;
ast
with exc_old ->
Log.finfo "[Univ_grs.load] FAILED to load file \"%s\" with OLD syntax: exc=\"%s\"" file (Printexc.to_string exc_old);
raise exc_new in
Grs.from_ast file new_ast
end
\ No newline at end of file
......@@ -114,6 +114,7 @@ module Grs : sig
type t
val load: string -> t
val load_old: string -> t
val dump: t -> unit
......@@ -127,7 +128,3 @@ module Grs : sig
val at_least_one: t -> string -> bool
val at_most_one: t -> string -> bool
end
module Univ_grs : sig
val load: string -> Grs.t
end
\ No newline at end of file
......@@ -55,10 +55,6 @@ let handle ?(name="") ?(file="No file defined") fct () =
module Domain = struct
type t = Grew_domain.Domain.t
let load filename =
let ast = Grew_loader.Loader.domain filename in
Grew_grs.Old_grs.domain_build ast
let load filename =
handle ~name:"Domain.load"
(fun () ->
......@@ -282,7 +278,13 @@ module Grs = struct
let load file =
handle ~name:"Grs.load" ~file
(fun () ->
Grew_grs.Univ_grs.load file
Grew_grs.Grs.load file
) ()
let load_old file =
handle ~name:"Grs.load" ~file
(fun () ->
Grew_grs.Grs.load_old file
) ()
let dump grs =
......
......@@ -135,6 +135,7 @@ module Grs : sig
type t
val load: string -> t
val load_old: string -> t
val dump: t -> unit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment