On Tue, Jul 01, 2003 at 09:09:34PM -0400, Dan Sugalski wrote: > At 11:43 PM +0200 6/29/03, Leopold Toetsch wrote: > >Dan Sugalski wrote: > >[ stack implementations ] > > > >Well... we only really have three. > > > >Control, User & Pad have the same stack engine. The register backing > >stacks and rxstack sum up to 5 more. > > The integer stack's separate on purpose, as it's supposed to be a > high-speed thing for the regex engine to use, at least for the most > part.
The integer stack is fairly useless for a complete regex engine. It prevents reentrancy and complicates some of the trickier things that need to be done in regexes. We can drop it anytime, and instead use an integer-only array PMC instead. (Such a PMC exists and is called "intlist.pmc", and uses the same stack engine as the control, user, and pad stacks.) I would remove the rxstack, but I didn't want to break the closest thing we have to a regex engine until I or someone else managed to release a different working implementation. The particular technique of using a single stack tied directly the interpreter is an evolutionary dead end, however. Good for a proof of concept, but that's it.