So, this is me attempting to figure out this thing. I still have some gaps marked with FIXME if you can help out.
(FYI, no idea what happened with the Notes. Did you do that after I forked or something?)
Closing this, as it is pretty old and Pegex is rife with doc now.