[Kde-bindings] next parser draft

Ashley Winters jahqueel at yahoo.com
Fri Jan 10 23:44:25 UTC 2003


--- Richard Dale <Richard_Dale at tipitina.demon.co.uk> wrote:
> Yes, just did - very interesting! It really does work well, apart
> from this:
> 
> private void setBackgroundModeDirect(QWidget*, 
> GCC::enumeral_type=HASH(0x1e4f718))

Fixed that.

> But it seems pretty complete. Is there class heirarchy info in the 
> translation-unit - can you get the parents of a class?

Added that. It now prints the requested class and all its superclasses.

> For languages like java, the bindings still need method arg names and
> doc 
> comments.

Done.

> The best solution for me, would be to add an optional first
> pass to 
> kalyptus analysing the translation-unit info, followed by the usual
> parse of 
> the headers in a second parse. Any method name/type signatures found
> in the 
> first parse analysing the translation unit would take precedence over
> ones 
> found in the second stage when parser the headers. If a matching
> method 
> name/type signature was found in the header parsing stage, then
> argument name 
> and doc comment info could be added to info already found from the 
> translation-unit.

I added basic default argument parsing -- basically, I support integer
constants and named global variables as default argument (mainly TRUE
and FALSE).

Make a list of missing info, and I'll tell you if it's possible on my
end.

> Or should we have a common XML format to make it easy to combine
> parsed info 
> of the Qt and KDE libs aquired from different sources? Eg: from 
> translation-unit, from C++ headers, hand annotated stuff and from the
> C++ 
> sources (for Qt qdoc comments). Then the translation unit dumper
> could output 
> the parsed info in the common XML format.

Yes, there needs to be an XML format. And my current method in PerlQt
of using "Smoke" to unify the language bindings was the wrong way to do
it. Every language binding needs to use an expanded version of QtC,
based on the XML spec generated from -fdump-t-u.

Umm... I also added casting operators and other stuff. Template classes
work -- give QPointArray a try. I also reorganized the code a bit. Good
stuff.

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: application/octet-stream
Size: 9627 bytes
Desc: dumper.pl
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20030110/27fcdf17/attachment.obj>


More information about the Kde-bindings mailing list