[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: pmatch library
- From: Reuben Thomas <rrt1001@...>
- Date: Wed, 15 Nov 2000 22:14:55 +0000 (GMT)
I've been having a look at this. It mentions Lua v2.4, and the revision
dates seem to go up to 1996, so it's pretty out of date.
I have it working with Lua 4.0, but there's still a certain amount of static
data, which either needs to be allocated per-thread or eliminated. I've
cleaned up the code a bit, and eliminated the function that lets you change
the various escape characters (regular expressions are bad enough without
this!), as well as changing one or two so that the syntax is a proper
superset of the current Lua pattern matching syntax.
It looks as though it'll be a bit of work to get it stateless, so I was
wondering whether anyone else has done this, and if not, if the Lua guys
fancy doing it properly.
As far as I can see, there's very little that this pattern matching library
has over and above standard patterns, but for text processing it has a
crucial extra: alternation. Is there a good reason why this couldn't be
added to standard Lua patterns?
http://sc3d.org/rrt/ | certain, a. insufficiently analysed