lua-users home
lua-l archive

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

On Thu, Oct 28, 2010 at 2:17 PM, Silas Silva <> wrote:
> That is a answer I've expected to get  :-)  I actually have reasons
> (learning) to use old Lex & Yacc, at least in the first releases of this
> project.

yes, it was pretty obvious, just wanted an excuse to put a grin today

but, if you want to learn, just do all three:

1: parser->C structs->Lua.  you'll find lots of references, work
should be straightforward

2: write to Lua structs directly within the parser.  did you know that
even without the language, Lua is a nice data structure library?

3: LPEG.  in most cases, the data flow in a LPEG parser works just like 2

I'd advise doing it in this order, because once 1 is running going to
2 is mostly removing code, and going to 3 is mostly syntax and some
extra code deletion.