[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua to LPEG?
- From: David Given <dg@...>
- Date: Tue, 21 Jun 2011 09:46:07 +0100
steve donovan wrote:
> Ah, but what would be gained from getting _identical functionality_?
> We already have Lua patterns.(And there's always lpeg.re)
Well, for a start it would allow more complex parsers to be made easily
from simple Lua patterns, which are much easier to write than lpeg
parsers, such as...
> Now, if it could work with Lua patterns + alternation, say, then that
> would be worth expending some cycles on.
...lpeg.L("([0-9]+)") + lpeg.L("([0-9a-fA-F]+)")
I think this is a good idea, and probably not too hard.
┌─── ｄｇ＠ｃｏｗｌａｒｋ．ｃｏｍ ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup
Description: OpenPGP digital signature