On Fri, Jul 01, 2005 at 12:02:44PM -0500, Patrick R. Michaud wrote: : Well, since each rule invocation ends up with its own stack : (it's a Coroutine), I'm hoping this won't be a big issue. But if : it does turn out to be one, I think we'll find a way to deal with : it then. :-)
Well, for simple subpatterns you can compress it somewhat if you have a foolproof way of reconstructing prior states from fail states, so that you don't have to keep actual states around, but maybe just a range of possible states. But the simple fact is that you have to keep the backtracking info *somewhere*, or you can't backtrack. The only practical solution is finding some way to cut out unreachable states, and that's hard in the absence of explicit user guidance. All that being said, heaps are easier to share than stacks--though my vague recollection is that Parrot stacks are really in the heap, so maybe that particular subproblem is already dealt with. Larry