lua-users home
lua-l archive

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

Thanks Fabien, I've checked out the gg.lua but it appears that I'd
have to use a completely different approach.
I liked PEG a lot since it's very clear and easily extendible.

2011/3/31 Fabien <>:
> You might want to have a look at Metalua's gg.lua library
> ( It's a
> parser combinator system rather than a PEG, but it focuses on AST
> production, ability to produce decent error messages on incorrect inputs
> (very important for programming languages), and dynamic extensibility (you
> probably don't care about the latter).
> The use of gg is detailed in Metalua's manual; you can also look at
> src/compiler/mlp_*.lua files for inspiration.
> On Thu, Mar 31, 2011 at 10:39 AM, Lode Hoste <> wrote:
>> Hi,
>> After watching the talk about LPeg I was inspired to use it to describe
>> the grammar of my DSL [but]
>> I can't find a good pointer on how to generate an AST or parse tree
>> with callbacks from it.