On 15/12/2010, at 6:34 PM, john skaller wrote:

> 
> Dang.. thought I had it :)


OMG: stupid typo in my changes:

(** Helper to remove a bid from the table roots or it's parent's children. *)
let remove_bid_from_parent bsym_table parent bid =
  match parent with
  | None -> ()
  | Some parent ->
    let kids = 
      try Hashtbl.find bsym_table.childmap parent 
      with Not_found -> Flx_types.BidSet.empty 
    in
    let kids = Flx_types.BidSet.remove bid kids in
    if Flx_types.BidSet.is_empty kids then Hashtbl.remove bsym_table.childmap 
bid
    else Hashtbl.replace bsym_table.childmap parent kids

Basically the childmap goes parent-> set of kids. However if the set is empty
we optimise it by removing the mapping completely.

The 'remove' there is removing the child entry, instead of the parent one :)

i doubt this will fix the original problem with regex .. but at least now with 
my
cleaned up code it generates working code most of the time again .. :)


--
john skaller
skal...@users.sourceforge.net





------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to