lua-users home
lua-l archive

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


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).

-Miles

-- 
Egotist, n. A person of low taste, more interested in himself than in me.