[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Lexer and syntax highlighter powered by LPeg
- From: Peter Odding <xolox@...>
- Date: Fri, 06 Apr 2007 12:56:52 +0200
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 based on the BNF at lua.org/manual/5.1 and a syntax
highlighter to try it out. Both are public domain, so if anyone wants to put
them on the wiki 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!