[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [LPeg] How can I signal parsing errors with LPeg?
- From: Matt the Undecidable Robot <undecidabot@...>
- Date: Sat, 3 Sep 2016 13:30:57 +0800
On 7/30/16, Soni L. <email@example.com> wrote:
> I'm writing an LPeg-based parser. How can I make it so a parsing error
> returns `nil, errmsg`?
I hope it's not too late for me to reply, but I just wanted to let you
know of a better solution to your problem by using LPegLabel.
Please see my answers to your question on stackoverflow for the
I also want to give a little more detail on LPegLabel. LPegLabel is an
extension of LPeg (1.0) so it can be used as a drop-in replacement for
LPeg. You can easily get the latest version on LuaRocks. LPegLabel is
developed by Professor Sérgio Medeiros under LabLua, and I worked on
rewriting a few grammars to use LPegLabel for my Google Summer of
Code. Please let me know of any issues you encounter with it.
LPegLabel is quite young, so we really appreciate any feedback we can