lua-users home
lua-l archive

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


> Going by the readme this looks great - I imagine I'll be giving it a
> go use it next time I need to write a parser.
>
> Being able to generate useful diagnostics from PEGs is probably the
> most attractive feature for me, so if you're looking for more examples
> or additions to the readme I might suggest adding a demonstration of
> this functionality.

Thanks. I've found the tracing capabilities incredibly helpful when
writing grammars.  You're right that an example showing this off is
needed.  Until that happens, there a crude way to see it.  In
codepeg.Parser, at the top of the file, change DEBUG2 = false to
DEBUG2 = true and you'll see a printout of the rules the parser
traverses less the tokens.

wes