Commit 0117d4e3 authored by pj2m's avatar pj2m

add function grs_only : returns only grs and don't create documentation

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/semagramme/libcaml-grew/trunk@6503 7838e531-6607-4d57-9587-6c381814729c
parent 7c6fce79
......@@ -41,6 +41,22 @@ let grs file doc_output_dir =
) else (
raise (File_dont_exists file)
)
let grs_only file =
if (Sys.file_exists file) then (
try
let ast = Grew_parser.parse_file_to_grs file in
(* Checker.check_grs ast; *)
let grs = Grs.build ast in
grs
with
| Grew_parser.Parse_error msg -> raise (Parsing_err msg)
| Utils.Build (msg,loc) -> raise (Build (msg,loc))
| Utils.Bug (msg, loc) -> raise (Bug (msg,loc))
| exc -> raise (Bug (Printf.sprintf "UNCATCHED EXCEPTION: %s" (Printexc.to_string exc), None))
) else (
raise (File_dont_exists file)
)
let get_available_seq grs = Grs.sequences grs
......
......@@ -30,6 +30,7 @@ val empty_grs : grs
@raise File_dont_exists if the file doesn't exists
*)
val grs : string -> string -> grs
val grs_only : string -> grs
val get_available_seq : grs -> (string * string list) list
......
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