[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bindings
Subject: Re: [Kde-bindings] Twine2 (PyKDE* code generation tool) Naming
From: Simon Edwards <simon () simonzone ! com>
Date: 2015-04-21 7:56:28
Message-ID: d95bc94eb08df96525a49f04147c8fb2 () localhost
[Download RAW message or body]
On 2015-04-19 22:07, Scott Kitterman wrote:
> I do have some additional ideas in terms of making is easier to use,
> but the
> biggest thing that would make it easier to use is if it could actually
> successfully parse everything.
This is just a general comment about how to approach this task. When it
comes the parsing of C++ headers you will need to pick your fights
carefully. C++ is so big and has so many special constructions that it
isn't an economical use of time to try to support everything. If you hit
a .h file which chokes the parser, you need to have a look at what is
inside it and whether it makes sense to pursue it. It might not even
have stuff which is relevant to Python, in which case you can skip it.
It might be full of templates which you can't directly map to Python, in
which case you may have to skip it and write some custom binding code in
C++ for SIP.
It is par for the course that something new comes along every 6 months
which the parse can't handle. What twine2 does is also unlike a
compiler. It tries to parse C++ and handle preprocessor macros etc at
the same time. A C++ compiler has a two step parser, preprocessor then
C++ parsing.
Also, it is possible to turn on tracing the parser by passing in some
debug=3 or something option. The docs for the parser library twine2
should say exactly what to do.
cheers,
--
Simon Edwards
simon@simonzone.com
Nijmegen, The Netherlands
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic