Fixed bug inverting the status of bureaucratic and non-bureaucratic transitions
authorkim <kim@3cdefd35-fc62-479d-8e8d-bae585ffb9ca>
Sun, 26 Apr 2009 09:53:56 +0000 (09:53 +0000)
committerkim <kim@3cdefd35-fc62-479d-8e8d-bae585ffb9ca>
Sun, 26 Apr 2009 09:53:56 +0000 (09:53 +0000)
git-svn-id: svn+ssh://idea.nguyen.vg/svn/sxsi/trunk/xpathcomp@354 3cdefd35-fc62-479d-8e8d-bae585ffb9ca

ata.ml

diff --git a/ata.ml b/ata.ml
index 6cdd9ef..b2b694f 100644 (file)
--- 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