lua-users home
lua-l archive

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


hello again.
Just a quick update that codepeg.Parser has been greatly simplified
and extended.  It now provides the following information when a
parsing error occurs.

- Stack of rules representing the furthest traversed position by the
Parser over the input list of tokens
- A list of tokens the Parser attempted to match against just before failing
- The last token matched along with its position in the token stream
and the active rule when the token was matched

All of this together can be used to write really nice error messages
that are actually useful.  Have a look at the README on the github
page for more details:

https://github.com/weshoke/codepeg

wes