lua-users home
lua-l archive

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


On Fri, Sep 03, 2010 at 11:51:00AM +0900, Miles Bader wrote:
> Silas Silva <silasdb@gmail.com> writes:
> > 1. Is there any replacement for lex/flex & yacc/bison for Lua?  How do
> >    you design DSLs in Lua?  I thought about using Lex & Yacc + C it is a
> >    long standing wish of mine to learn parsers, BNF with Lex & Yacc...
> 
> Use "LPeg" -- it's fast, easy to use, and very expressive, and is well
> supported and popular in the Lua community.  LPeg can replace both lex
> and yacc (just think of a grammar which goes down to the character
> level).

Hmmm, sounds good.  If it goes to character level, it can replace lex
too...  Found it:

http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html

Going to take a look.  Thanks.

-- 
Silas Silva