[Kde-bindings] Refactoring kalyptus

Roberto Raggi roberto.raggi at trolltech.com
Thu Dec 8 09:39:18 UTC 2005


Hi!

On Wednesday 07 December 2005 17:08, Richard Dale wrote:
> On Wednesday 07 December 2005 14:10, Caleb Tennis wrote:
> > Hi,
> >
> > I know there was some thoughts and talk about 6 months ago on smoke
> > refactoring and reworking for the Qt4 bindings.  One thought I had on the
> > subject was to use gcc's preprocessor dump to handle the #defines and
> > #ifdef stuff that kalyptus tries cleverly to muddle through.
g++ -E -dM file.cpp -o <something>

> >
> > It looks like just doing a "gcc -E" on a header file, provided all of the
> > #includes are met, will preprocess the file automagically.  This might
you can disable the std C/C++ headers with the options -nostdinc -nostdinc++..
or you can use my preprocessor. kdev-pp the preprocessor I wrote for KDevelop 
is highly customizable. It is very easy to embed kdev-pp into an existing 
application. 

>
> I think the problem is that sometimes you want the macros before they are
> pre-processed, and you also want to be able to get the comments for
> language bindings. For instance, I convert the KDE C++ style doc comments
that's why I wrote a new preprocessor for KDevelop

> I think my personal 'plan A' for a better C++ parser would be to use the
> one that Roberto Raggi is developing for KDevelop 4/KDE 4. That is what
> Trolltech are using for their Qt4 java bindings, although I don't know
> anything else about their approach as they're doing it 'behind closed
> doors' as a commercial product (although I assume will also be GPL'd). I'll
> cc this to the kdevelop-devel list as I regard language bindings work as
> part of creating RAD environments, and they aren't much use without
> suitable IDE's to go with them, and there are C++ parsing issues that the
> projects have in common.
I agree.. a real C++ parser is very helpful to write tools like generators.. 
For instance Harald is using the new KDevelop's C++ parser to generate the 
symbols for Qt(and KDE?) (we need the symbols for the LSB project)
http://websvn.kde.org/trunk/playground/utils/lsbcpp/

The parser and the preprocessor are in good shape.. but the Binder and the 
CodeModel (a sort of symbol table + symtab generator) is pretty bad :( but 
Harald is so good that he found a way to use it :-)

ciao robe



More information about the Kde-bindings mailing list