(* *)
(***********************************************************************)
-open Format
-
type state = State.t
type label = QNameSet.t
| (a,s,l) :: tl -> (s,l) :: (remove_states tl) in
remove_states (SetT.elements (SetT.filter filter asta.trans))
+let dummy = {
+ reco = StateSet.empty;
+ selec = StateSet.empty;
+ bottom = StateSet.empty;
+ top = StateSet.empty;
+ trans = SetT.empty;
+}
+
let print fmt asta =
let pp = Format.fprintf fmt in
pp "\nTop states: ";
StateSet.print fmt asta.top;
pp "\nTransitions: \n";
- Format.fprintf fmt "{@[<hov n> %a @]}" (* todo: check boxes *)
+ Format.fprintf fmt "{@[<hov 2> %a @]}" (* todo: check boxes *)
(Pretty.print_list ~sep:"@, " (Transition.print))
(SetT.elements (asta.trans))
(* *)
(* TAToo *)
(* *)
-(* ? *)
+(* Lucca Hirschi, ? *)
(* ? *)
(* *)
(* Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
val transitions : t -> state -> (label*formula) list
(** Give the list of labels and formulae from transitions for a given state *)
+val dummy : t
+(** The empty automaton *)
+
val print : Format.formatter -> t -> unit
(** Describe the automaton as text *)
--- /dev/null
+(***********************************************************************)
+(* *)
+(* TAToo *)
+(* *)
+(* Lucca Hirschi, ? *)
+(* ? *)
+(* *)
+(* Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
+(* Recherche Scientifique. All rights reserved. This file is *)
+(* distributed under the terms of the GNU Lesser General Public *)
+(* License, with the special exception on linking described in file *)
+(* ../LICENSE. *)
+(* *)
+(***********************************************************************)
+
+let trad qu = Asta.dummy
--- /dev/null
+(***********************************************************************)
+(* *)
+(* TAToo *)
+(* *)
+(* Lucca Hirschi, ? *)
+(* ? *)
+(* *)
+(* Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
+(* Recherche Scientifique. All rights reserved. This file is *)
+(* distributed under the terms of the GNU Lesser General Public *)
+(* License, with the special exception on linking described in file *)
+(* ../LICENSE. *)
+(* *)
+(***********************************************************************)
+
+(** Implementation of compilation from XPath queries into ASTA *)
+
+val trad : XPath.Ast.path -> Asta.t
+(** Compilation function *)
only the first line of XPath_querie_file is read
*)
-module F = Formula
-module G = Asta
-
-(* to force ocaml build to add Formula to the dependency chain even if
- we don't use it yet*)
let doc =
let fd = open_in Sys.argv.(1) in
open Format
+let asta = Compil.trad query
+
let () =
fprintf err_formatter "Query: %a\n%!" XPath.Ast.print query;
+ fprintf err_formatter "Asta: %a\n%!" Asta.print asta;
fprintf err_formatter "Document:\n%!";
Tree.print_xml stderr doc (Tree.root doc);
exit 0