type opcode =
- | CACHE
- | RETURN
+ | RETURN of unit
| LEFT of Translist.t * jump
| RIGHT of Translist.t * jump
| BOTH of Translist.t * jump * jump
+ | CACHE of unit
type t = opcode Cache.Lvl2.t
-let dummy = CACHE
+let dummy = CACHE ()
+let return = RETURN ()
let print_opcode fmt o = match o with
- | CACHE -> fprintf fmt "CACHE"
- | RETURN -> fprintf fmt "RETURN"
+ | CACHE _ -> fprintf fmt "CACHE"
+ | RETURN _ -> fprintf fmt "RETURN"
| LEFT (tl, j) -> fprintf fmt "LEFT(\n[%a], %a)" Translist.print tl print_jump j
| RIGHT (tl, j) -> fprintf fmt "RIGHT(\n[%a], %a)" Translist.print tl print_jump j
| BOTH (tl, j1, j2) -> fprintf fmt "BOTH(\n[%a], %a, %a)" Translist.print tl print_jump j1 print_jump j2
let op =
let empty_s1 = StateSet.is_empty states1 in
let empty_s2 = StateSet.is_empty states2 in
- if empty_s1 && empty_s2 then RETURN
+ if empty_s1 && empty_s2 then return
else if empty_s1 then
RIGHT (tr_list,
compute_jump auto tree tag states2 DIR_RIGHT)
op
let get_transitions = function
- | CACHE | RETURN -> failwith "get_transitions"
+ | CACHE _ | RETURN _ -> failwith "get_transitions"
| LEFT (tr, _)
| RIGHT (tr, _)
| BOTH (tr, _, _) -> tr