lua-users home
lua-l archive

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


Sounds like there are a range of options for what you need.  If you
can make do with the Lua metamethods and a little string substitution,
I would definitely stick with a pure Lua implementation.  However, if
you need to define a syntax that can't be handled by existing Lua
mechanisms, you can write a simple grammar and interpret the AST
yourself.  I have had to do this for a couple of projects, which is
why I wrote the codepeg[1] module.  It can automatically generate a
parser from a grammar specification.

wes

[1] https://github.com/weshoke/codepeg