[C++-sig] Boost.Python code generator

David Abrahams dave at boost-consulting.com
Fri Dec 6 16:59:02 CET 2002


Nicodemus <nicodemus at globalite.com.br> writes:

> Niki Spahiev wrote:
>
>> Why not borrow syntax (and parser) from Pyrex?
>
> I will probably use the Pyrex parser, Plex.
>
>> Also maybe swig-xml to interface can work for generating initial
>> contents.
>
> Good idea. But I will probably worry about this only later. 8)
>
>> Whatever it is i have plan how to use it.
>
> Nice to know. 8)
>
>
> I have some changes in the interface file, and would like to know your
> opinion...
> I followed David's suggestion to make the syntax look a little more
> like C++:


I'd like to encourage you to step back and think about the
implications of where this is going.

You're already getting very close to C++. So,

  1. Can you support a model where the user just annotates an existing
     class declaration with comments, for people who are developing
     the C++ interface as well as publishing bindings?

  2. Can you support a model where the user just says "export class
     X", and then describes the /differences/ from some default way of
     exposing all of X's public interface, perhaps using Pure Python?

-Dave

P.S. There are a number of tools available which can parse C++. For
example, see the OCC implementation in Synopsis (synopsis.sf.net) and
GCC_XML, which I've mentioned before.

-- 
                       David Abrahams
   dave at boost-consulting.com * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution





More information about the Cplusplus-sig mailing list