On Thursday 06 June 2002 00:33, Hugo van der Sanden wrote: > No, not attached. :) > > Just wanted to write down a thought I had during the discussion > phase, about how someone might go about implementing it. > > This might be more obvious to someone who hasn't been corrupted > by the p5 engine, but it is about what you do when you hit the > 'success' state - the p5 engine throws away everything at that > point, because it no longer needs it. The p6 engine will often > want to preserve its state at that point, either because it is > in a subrule or because it is under a :any flag, so that it can > cope with continuation - either you backtracked through the > subrule or you asked for the next :any match - by backtracking > from that success state. > > While I'm really looking forward to seeing A5 made manifest, I don't > currently have the mental or physical bandwidth to subscribe to the > p6 mailing lists; however I'd be more than happy to be cc'd on any > regex-related discussions. > > Hugo
As one of the 3 or 4 people in the world that understands the p5 engine, we would welcome your input. The current thinking, and a5 just reinforces it, is that regexes will be compiled down to Parrot bytecode, so there should be no technical problem with preserving the metainformation at the end of a regex call. We do, however, have a set of specialized regex ops that may be used to simplify and/or speed up atomic matching operations. They currently maintain an internal state that is mostly opaque at the Parrot bytecode level. That state may need to be made more transparent. -Mark