Commit cdc20d71 authored by Bruno Guillaume's avatar Bruno Guillaume

clean

parent 188f89ad
digraph grew {
node [shape=Mrecord];
rankdir = LR;
grew_base [label="grew_base|String_map\nString_set\nInt_map\nInt_set\nString_\nDot\nLoc\nFile\nArray_\nList_\nMassoc_make()\nError\nId\nTimeout\nGlobal"]
grew_types [label="grew_types|Pid(_map\|_set)\nGid(_map)\nMassoc[_gid\|_pid]\nLex_par\nConcat_item"]
grew_base [label="grew_base|String_set\nString_map\nInt_set\nInt_map\nLoc\nError\nString_\nDot\nFile\nArray_\nList_\nMassoc_make()\nId\nTimeout\nGlobal"]
grew_types [label="grew_types|Pid\nPid_set\nPid_map\nGid\nGid_map\nMassoc_gid\nMassoc_pid\nMassoc_string\nLexicon\nLexicons\nConcat_item"]
grew_ast [label="grew_ast|Ast"]
grew_domain [label="grew_domain|Label_domain\nFeature_domain\nDomain"]
grew_loader [label="grew_loader|Loader\nParser"]
......@@ -11,9 +11,8 @@ digraph grew {
grew_node [label="grew_node|G_node\nP_node"]
grew_command [label="grew_command|Command"]
grew_graph [label="grew_graph|P_deco\nP_graph\nG_deco\nG_graph"]
grew_rule [label="grew_rule|Instance(_set)\nRule"]
grew_grs [label="grew_grs|Rewrite_history\nModul\nGrs"]
grew_html [label="grew_html|Html_doc\nHtml_rh\nHtml_sentences\nHtml_annot\nGr_stat\nCorpus_stat"]
grew_rule [label="grew_rule|Rule"]
grew_grs [label="grew_grs|Grs"]
grew_domain -> grew_ast -> grew_types -> grew_base
grew_edge -> grew_domain
......@@ -28,8 +27,7 @@ libgrew_types -> grew_graph
grew_rule -> libgrew_types
grew_grs -> grew_rule
grew_grs -> grew_loader -> grew_lexer -> grew_parser -> grew_ast
grew_html -> grew_grs
libgrew -> grew_html
libgrew -> grew_grs
libgrew -> libgrew_types [style=dotted]
}
\ No newline at end of file
......@@ -332,15 +332,6 @@ module Ast = struct
rule_dir: string option; (* the real folder where the file is defined *)
}
type modul = {
module_id:Id.name;
rules: rule list;
deterministic: bool;
module_doc:string list;
mod_loc:Loc.t;
mod_dir: string; (* the directory where the module is defined (for lp file localisation) *)
}
type feature_spec =
| Closed of feature_name * feature_atom list (* cat:V,N *)
| Open of feature_name (* phon, lemma, ... *)
......
......@@ -585,7 +585,6 @@ module Id = struct
end (* module Id *)
(* ================================================================================ *)
(* copy from leopar *)
module Timeout = struct
exception Stop
......@@ -629,4 +628,4 @@ module Global = struct
let debug = ref false
let safe_commands = ref false
end
end (* module Global *)
......@@ -8,12 +8,44 @@
(* Authors: see AUTHORS file *)
(**********************************************************************************)
module String_map : Map.S with type key = string
module String_set : Set.S with type elt = string
module String_map : Map.S with type key = string
module Int_set : Set.S with type elt = int
module Int_map : Map.S with type key = int
(* ================================================================================ *)
(* [Loc] general module to describe errors location: (file name, line number in file) *)
module Loc: sig
type t
val empty: t
val file_line: string -> int -> t
val file_opt_line: string option -> int -> t
val file_opt_line_opt: string option -> int option -> t
val file: string -> t
val set_line: int -> t -> t
val to_string: t -> string
end
(* ================================================================================ *)
module Error: sig
exception Build of (string * Loc.t option)
val build: ?loc: Loc.t -> ('a, unit, string, 'b) format4 -> 'a
exception Run of (string * Loc.t option)
val run: ?loc: Loc.t -> ('a, unit, string, 'b) format4 -> 'a
exception Bug of (string * Loc.t option)
val bug: ?loc: Loc.t -> ('a, unit, string, 'b) format4 -> 'a
exception Parse of (string * Loc.t option)
val parse: ?loc: Loc.t -> ('a, unit, string, 'b) format4 -> 'a
end
(* ================================================================================ *)
(* [Pid_set] *)
module String_: sig
......@@ -41,25 +73,6 @@ module Dot: sig
val to_png_file: string -> string -> unit
end
(* ================================================================================ *)
(* [Loc] general module to describe errors location: (file name, line number in file) *)
module Loc: sig
type t
val empty: t
val file_line: string -> int -> t
val file_opt_line: string option -> int -> t
val file_opt_line_opt: string option -> int option -> t
val file: string -> t
val set_line: int -> t -> t
val to_string: t -> string
end
(* ================================================================================ *)
(* [File] functions to read/write file *)
module File: sig
......@@ -237,20 +250,6 @@ module type S =
(* ================================================================================ *)
module Massoc_make (Ord : OrderedType) : S with type key = Ord.t
(* ================================================================================ *)
module Error: sig
exception Build of (string * Loc.t option)
val build: ?loc: Loc.t -> ('a, unit, string, 'b) format4 -> 'a
exception Run of (string * Loc.t option)
val run: ?loc: Loc.t -> ('a, unit, string, 'b) format4 -> 'a
exception Bug of (string * Loc.t option)
val bug: ?loc: Loc.t -> ('a, unit, string, 'b) format4 -> 'a
exception Parse of (string * Loc.t option)
val parse: ?loc: Loc.t -> ('a, unit, string, 'b) format4 -> 'a
end
(* ================================================================================ *)
module Id: sig
......
......@@ -23,8 +23,6 @@ let parse_handle fct_name fct lexbuf =
| err -> Error.bug ~loc:(Global.get_loc ()) "%s, Unexpected error: %s" fct_name (Printexc.to_string err)
module Loader = struct
(* ------------------------------------------------------------------------------------------*)
let domain file =
try
......@@ -190,6 +188,4 @@ module Parser = struct
let strategy = parse_handle "[Grew_loader.Parser.strategy]" (Grew_parser.strat_alone Grew_lexer.global) lexbuf in
strategy
with Sys_error msg -> Error.parse "[Grew_loader.Parser.strategy] %s" msg
end
end (* module Parser *)
......@@ -47,6 +47,9 @@ module Pid = struct
| Neg i -> sprintf "Neg %d" i
end (* module Pid *)
(* ================================================================================ *)
module Pid_set = Set.Make (Pid)
(* ================================================================================ *)
module Pid_map =
struct
......@@ -68,9 +71,6 @@ module Pid_map =
let union_map m m' = fold (fun k v m'' -> (add k v m'')) m m'
end (* module Pid_map *)
(* ================================================================================ *)
module Pid_set = Set.Make (Pid)
(* ================================================================================ *)
module Gid = struct
type t = int
......
......@@ -31,6 +31,10 @@ module Pid : sig
val to_string: t -> string
end (* module Pid *)
(* ================================================================================ *)
(* [Pid_set] *)
module Pid_set : Set.S with type elt = Pid.t
(* ================================================================================ *)
(* [Pid_map] is the map used in pattern graphs *)
module Pid_map : sig
......@@ -39,9 +43,6 @@ module Pid_map : sig
val exists: (key -> 'a -> bool) -> 'a t -> bool
end (* module Pid_map *)
(* ================================================================================ *)
(* [Pid_set] *)
module Pid_set : Set.S with type elt = Pid.t
(* ================================================================================ *)
(* [Gid] describes identifier used in full graphs *)
......@@ -112,8 +113,7 @@ module Lexicons : sig
type t = (string * Lexicon.t) list
val check: loc:Loc.t -> string -> string -> t -> unit
end
end (* module Lexicons *)
(* ================================================================================ *)
module Concat_item : sig
......
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