[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] tolua++ 1.0.6 and lua_qt4 0.0.2a
- From: Lisa Parratt <lisa@...>
- Date: Thu, 08 Sep 2005 12:22:05 +0100
Ariel Manzur wrote:
Probably not tolua++, but a new program (that might use tolua's
library..). Do you know where I could find documentation about these '.tu'
files? they seem to grow pretty big, even for really simple definitions.
I never found a canonical definition. Part of the GCC documentation
lists all the node types, but from the point of view of inside GCC,
rather than the .tu files. The first @<number> on a line is the index of
the node described by the following text. After this you have a number
of key value pairs. If the value is of the form @<number>, then it's a
pointer to another node.
The other important thing to realise is that it contains a description
of the whole program, code and all. The first step I do is to cull all
the code out of the tree, leaving only global
types/variables/functions/constants and the types their signatures refer to.
We implemented our own proprietary system using the AST information,
and it's turned out to be fully automatic, and fairly easy to make
Can I look at the code? :)
I'm very sorry, but it's company confidential. Please trust me, though,
the results are very much worth it - it really can be fire and forget.
Ours can be invoked like a compiler, and we've simply added an extra
rule to our makefiles. We've not needed to tailor a single header file,
either (if you specify .h files, the tool builds a temporary C file that
includes them all, and builds the gluecode from the output from that).
The technique also has the advantage that it works for pretty much any
language supported by GCC, and not just C/C++.