Hi all! Despite my interest in LPeg it took me till last week to try
it out.
First evaluation: it rocks :). I think LPeg can be for Lua what regex
are for
Perl. That is, in popularity, because LPeg's flexibility and speed are
already
amazing. This says *a lot*. As a test for myself and LPeg I wrote a
lexer/tokenizer[1] based on the BNF at lua.org/manual/5.1 and a syntax
highlighter[2] to try it out. Both are public domain, so if anyone
wants to put
them on the wiki[1] or if Roberto wants to include the lexer as an
example with
LPeg, that's fine with me.
As noted in the readme for the lexer I think it should handle all
syntax but I
might have missed a number format or something. Corrections welcome.
Thank you Roberto for this most wonderful library!
[1] http://xolox.ath.cx/lua/lexer.html
[2] http://xolox.ath.cx/lua/highlighter.html
[3] http://lua-users.org/wiki/LpegRecipes