Commit c3b79a9f authored by bguillaum's avatar bguillaum

new function to get the line number of an error

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/semagramme/libcaml-grew/trunk@8517 7838e531-6607-4d57-9587-6c381814729c
parent c467272f
......@@ -26,6 +26,7 @@ module Loc = struct
let file f = (f, -1)
let to_string (file,line) = sprintf "[file: %s, line: %d]" (Filename.basename file) line
let to_line (_,line) = line
let opt_set_line line = function
| None -> None
......
......@@ -51,6 +51,7 @@ module Loc: sig
val opt_set_line: int -> t option -> t option
val to_string: t -> string
val to_line: t -> int
end
......
......@@ -33,7 +33,9 @@ let set_timeout t = Timeout.timeout := t
type loc = Loc.t
let string_of_loc = Loc.to_string
let line_of_loc = Loc.to_line
type instance = Instance.t
exception File_dont_exists of string
......
......@@ -17,6 +17,12 @@ open Grew_grs
val css_file: string
type loc = Loc.t
type instance = Instance.t
val line_of_loc: loc -> int
val string_of_loc: loc -> string
exception File_dont_exists of string
......@@ -88,6 +94,7 @@ File extension should be '.gr' or '.conll'.
*)
val load_graph: string -> Instance.t
(** [of_conll filename line_list] *)
val of_conll: string -> (int * string) list -> Instance.t
val xml_graph: Xml.xml -> Instance.t
......@@ -151,6 +158,13 @@ val to_conll_graph: graph -> string
(* type and function added for the grep mode of grew *)
type pattern
type matching
(** [load_pattern filename] returns the pattern describer in the fuile *)
val load_pattern: string -> pattern
(** [match_in_graph patern graph] returns the list of the possible matching og [pattern] in [graph] *)
val match_in_graph: pattern -> graph -> matching list
(** [match_deco pattern matching] returns the deco to be used in the graphical representation.
WARNING: the function supposes that [matching] was find with the given [pattern]! *)
val match_deco: pattern -> matching -> deco
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