On Fri, Sep 24, 2004 at 11:36:43AM -0500, Rod Adams wrote:
> Output would be a step by step graph of the internal logic used to match 
> / not match the string. I'd break the RE up into the same pieces the 
> Engine does, then show how that subrule matched char a, then char b, but 
> failed to match c, so it backtracked to a, etc. [...]
> The beauty of this solution is, if Perl6 and/or Parrot (not sure which 
> is the better choice) provides a few hooks into the P6RE Engine, it 
> would be absolutely authoritative, and could even handle cases where the 
> rules changed due to module loading. And since I'd expect those hooks to 
> be in there anyways for other reasons (mainly, letting people muck 
> around with how they work), I'd suspect all the "Core support" needed 
> would already be there (I may be wrong.).

Indeed, I would expect that at some point the match object returned
by a particular match could provide exactly this sort of information
(perhaps in response to a rule option).  Indeed, it may be needed in 
order for the perl 6 compiler to provide useful error messages about 
why your particular program won't compile (or why it compiled the 
way it did).  

I'll keep this in mind as I continue writing the engine--thanks.  I'm
hoping to have a preliminary implementation available for public
consumption in a couple of weeks.

Pm

Reply via email to