[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Lua and QuakeC
- From: Quinn Tyler Jackson <quinn-j@...>
- Date: Thu, 06 May 2004 07:44:18 -0700
> It seems like a good percentage of the people on this list use
> Lua in a game
> engine.
>
> Brian.
I use Lua as a grammar reduction event language. What's nice about Lua (for
my purposes) is that I can do this:
grammar SomeGrammar
{
S ::= a b c;
a ::= '[a-z]+';
b ::= '[0-9]+';
c ::= '[a-z]+';
@function_impls = :{
-- Lua code for reduction events
function b_event(P)
if (P:MATCHED()) then
print(P:LEXEME());
end
end
}:;
};
This allows grammars to be loaded and debugged at run-time, rather than
requiring them to be compiled outside of the grammar development
environment. By throwing a Lua debugger and profiler into the grammar
development environment, it became possible to single step through both the
grammar portions and the event callbacks. It saves quite a bit of
development time to be able to do that with a grammar.
In the process of integrating Lua into the grammar development environment,
I've had to write a Lua debugger and profiler. I've been considering
factoring out the debugger and profiler for use in stand-alone Lua
development. Are there any Lua profilers out there already?
--
Quinn