[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:       Scott Kitterman <kde () kitterman ! com>
Date:       2015-04-21 11:34:01
Message-ID: 2974831.gAeFymk1eN () kitterma-e6430
[Download RAW message or body]

On Tuesday, April 21, 2015 09:56:28 AM Simon Edwards wrote:
> 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.

Thanks.  I appreciate the advice.  To be clear, by everything, I meant 
everything in Kf5, not the universe of C++.

Scott K
_______________________________________________
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