Chris - I have a nice 16-sided wheel that may work well enough for your purposes. I had hoped to push it to CPAN last summer until I uncovered a conceptual pitfall in the design. However, for your simple purposes, it should work just fine. I've used it in some of my research code for doing exactly the sort of pattern matching you want. For my work we ended up changing to a non-greedy approach, so work on this project stagnated in the middle of a rewrite. However, an earlier checkout should work.
The library was called Regex::Engine, but it's really a greedy pattern matching engine, and Jeff and I decided to have some fun and rename it it to Scrooge instead of the more boring Greedy::Engine or similar. Not all of the files have made the complete switch, as I changed the name just before putting the project down. The repository for this work is at https://github.com/run4flat/Regex-engine. I never finished my latest round of work, so I highly suggest that anybody looking to use this engine check out commit 315cc9. That is, say this to get to something that mostly works right: > git clone https://github.com/run4flat/Regex-engine.git > cd Regex-engine > git checkout 315cc9 > perl Build.PL > ./Build @Derek, in the email that you reference, I was working on notation. One thing that I realized that led to my productive work with Scrooge is that I *don't* need to have a notation to write the engine. So Scrooge doesn't have any shorthand notation for building patterns. You have to assemble them, rather like building a series of ops. @Chris, the conceptual pitfall has to do with indiscriminately using the same pattern object in a recursive pattern match. If you do that, you can break the engine. You shouldn't need to do that, however, so it should be easy to avoid that pitfall. I wrote a tutorial: https://github.com/run4flat/Regex-engine/blob/master/lib/Scrooge/Tutorial.pod. That should give you a good start, I think. I must leave now, but I can reply with more details if you have questions. David
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
