From b1e6806834df253d5454fffad7f14fb24c74af70 Mon Sep 17 00:00:00 2001 From: kim Date: Sun, 26 Apr 2009 09:53:56 +0000 Subject: [PATCH] Fixed bug inverting the status of bureaucratic and non-bureaucratic transitions git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/xpathcomp@354 3cdefd35-fc62-479d-8e8d-bae585ffb9ca --- ata.ml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ata.ml b/ata.ml index 6cdd9ef..b2b694f 100644 --- a/ata.ml +++ b/ata.ml @@ -213,14 +213,16 @@ module Transition = struct s == s' && b==b' && m==m' && Formula.equal f f' end) - let print ppf f = let (st,mark,form,_) = node f in + let print ppf f = let (st,mark,form,b) = node f in Format.fprintf ppf "%i %s" st (if mark then "⇒" else "→"); Formula.print ppf form; - Format.pp_print_flush ppf () + Format.fprintf ppf "%s%!" (if b then " (b)" else "") + + module Infix = struct let ( ?< ) x = x - let ( >< ) state (l,mark) = state,(l,mark,true) - let ( ><@ ) state (l,mark) = state,(l,mark,false) + let ( >< ) state (l,mark) = state,(l,mark,false) + let ( ><@ ) state (l,mark) = state,(l,mark,true) let ( >=> ) (state,(label,mark,bur)) form = (state,label,(make (state,mark,form,bur))) end @@ -364,11 +366,10 @@ module F = Formula Hashtbl.fold (fun p l acc -> if p == q then List.fold_left - - (fun acc (ts,t) -> - let _,_,_,aux = Transition.node t in - if aux then acc else - TagSet.cup ts acc) acc l + (fun acc (ts,t) -> + let _,_,_,aux = Transition.node t in + if aux then acc else + TagSet.cup ts acc) acc l else acc) a.trans TagSet.empty @@ -390,7 +391,6 @@ module F = Formula let next_sibling_ctx x _ = Tree.next_sibling x let r_ignore _ x = x - let set_get_tag r t = r := (fun _ -> t) module type ResultSet = sig -- 2.17.1