[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: yet another pattern-matching library for Lua
- From: "Thomas Harning Jr." <harningt@...>
- Date: Thu, 4 Jan 2007 11:55:49 -0500
On 1/3/07, Mike Pall <mikelu-0701@mike.de> wrote:
Hi,
I found no closed PEG for properly parsing Lua 5.1 long strings
and long comments. This is easy for any finite subset:
"[==[" * (P(1)-"]==]")^0 * "]==]"
Could this be solved w/ a recursive PEG?
Ex:
[<recurse>]
recurse:=<recurse>=
recurse:[<innertext>]
innertext: (Hrm... what here?)
... Hrm, just realized the error there... don't think we can have it
backstep out to try the end-sequence match.
However... my approach 'might' be practical in an extension to the
matching system.
--
Thomas Harning Jr.