projects
/
SXSI
/
xpathcomp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New files refactoring the code
[SXSI/xpathcomp.git]
/
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)
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.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
module Infix = struct
let ( ?< ) x = x
- let ( >< ) state (l,mark) = state,(l,mark,
tru
e)
- let ( ><@ ) state (l,mark) = state,(l,mark,
fals
e)
+ let ( >< ) state (l,mark) = state,(l,mark,
fals
e)
+ let ( ><@ ) state (l,mark) = state,(l,mark,
tru
e)
let ( >=> ) (state,(label,mark,bur)) form = (state,label,(make (state,mark,form,bur)))
end
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
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
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 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
module type ResultSet =
sig