[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Status of token filters?
- From: Asko Kauppi <askok@...>
- Date: Sun, 3 Feb 2008 11:41:27 +0200
luaSub does the front end thing by creating a lua_Reader that feeds
the resulting code (after tokenizing & syntax mods) to liblua,
internally. It's just an extended 'lua' application, with all the
normal command line flags working as usual. The downside is that
there's essentially a second, unneeded tokenizing round (the usual
Lua round) but it really isn't much of a speed issue, either.
I guess it all comes to how and where one wishes to use syntax mods.
Personally, I think the entry step for them should be relatively low,
and they should be usable commonplace, by common man. This year will
Mark Meijer kirjoitti 3.2.2008 kello 0:29:
On 02/02/2008, Asko Kauppi <firstname.lastname@example.org> wrote:
As Luiz mentions with the token filter patch, it's mainly _intended_
to be used with 'luac', not liblua itself.
Having worked my head off with luaSub, I think token filters won't
even be needed in Lua core, at all. Along the lines of Luiz's
recommendation, token filtering will be an added layer more in the
realm of the syntax front end.
Good news: no changes to Lua required
Bad news: there are multiple solutions with differing way of
syntax mods (this is not necessarily bad, imho)
Yeah I noticed Luiz writing that somewhere. Isn't the "syntax front
end" of luac the same realm as the "syntax front end" of the Lua,
though? Changes would be required to it, but there would then be two
variations of it (one the runtime core, and one the pre-compiler
tool). And in order to use the token-filter enabled version, one would
be required to precompile all their stuff and have the runtime invoke
the resulting bytecode.
Precompile config files created/edited by your users because you
wanted them to have a less intimidating/more intuitive syntax? I don't
really see any advantage, nor how it mitigates any of the possible
problems associated with making it officially part of Lua in the first
Maturity-wise, the original patch's main shortcoming is in not giving
syntax awareness. Both Metalua and luaSub do provide that.
If you wish to test-drive luaSub for your own particular itch, I'll
be happy to take in people for a test drive. It _is_ approaching
Sounds nice. Can't guarantee when I'd have time to indulge myself with