lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Fabio Mascarenhas <mascarenhas@acm.org> wrote:
>
> I have updated luma.re to work with LPEG 0.10, forking LPEG's re.lua.
> The changes are simple:
>
> * allow _ as a non-terminal name

I used to patch re.lua the same way as you to allow underscores in
non-terminals, but since 0.10 allows underscores in the trailing part of
names I dropped that part of my patch. I think re.lua would be less weird
if it allowed initial underscores like other languages.

> * search for non-terminals in the definitions first (instead of
> requiring definitions to be prepended by %)

I also have a patch to do this:

https://github.com/fanf2/lua-5/commit/1143f16f

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Fair Isle, Faeroes: Westerly 5 or 6, but 4 in east Fair Isle at first,
increasing 5 to 7 for a time. Rough or very rough, but moderate in east Fair
Isle at first. Rain, then squally showers. Moderate or poor, becoming good.