[Kde-bindings] -fdump-translation-unit parser

Ashley Winters jahqueel at yahoo.com
Thu Jan 9 04:32:31 UTC 2003


Howdy KDE bindings folks. Great idea, Germain. :)

I'm tossing out the latest skeleton of my -fdump-t-u parser for kicks.

Here's how you use it atm:
echo '#include <qwidget.h>' > widget.cpp
gcc -c -fdump-translation-unit -I$QTDIR/include widget.cpp
perl dumper.pl widget.cpp.tu | less

Wait 15 seconds, and it'll give you a list of functions as seen by the
gcc compiler for the class. I'll do enums next, or something (err, make
that default values next). This skeleton is enough to get an idea how
I'd generate a language binding using -fdump-t-u.

Till later,
Ashley Winters

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dumper.pl
Type: text/x-perl
Size: 4875 bytes
Desc: dumper.pl
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20030108/7d849348/attachment.bin>


More information about the Kde-bindings mailing list