lua-users home
lua-l archive

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

That all raises the question whether Lua should support
some minimal form of domain specific language, probably
via including token filter into the std. distribution.
That would reduce the need to build a complete language
on top of Lua.

That makes sense, because doing your own parser is not easy. You end
up with an incomplete experience for your users, and have incremented
the global count of programming languages.  Far better to take stock
Lua and add just a little bit of domain-specific spice.

How something like 'domain' works is another question ... currently
the token filter patch just looks for the Lua global 'FILTER'.  There
is possibly a performance hit to having the patch in mainstream Lua,
because for every token read it needs to check for the existence of
this global.  However, I haven't done tests so it's hard to say
whether it makes much difference.

Looking for a global is no good idea. Probably another keyword
like "syntax" or so is required. Yes, I know ... ;-)