[Kde-bindings] next parser draft

Adam Treat manyoso at yahoo.com
Fri Jan 10 19:45:10 UTC 2003


Ashley, good work man!  If Qt# is to use this we'll need more metadata 
though...  Here is a partial list:

Signals/Slots, PassBy, QProperties, robust default argument parsing, the name 
of the header file where the class was defined , and probably a lot of stuff 
am forgetting.  Basically take a look at a current example of our xml file...  
We don't have any support for docs/templates at this point and we unwind the 
typedefs in binge, but doing it in the xml would be good.

Cheers,

Adam

On Friday 10 January 2003 06:44 pm, Ashley Winters wrote:
> --- 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




More information about the Kde-bindings mailing list