Re: [C++-sig] pyste, gccxml and boost ublas, random number generator etc

Roman Yakovenko <[email protected]>
Newsgroups gmane.comp.documentation.synopsis
Message-ID <[email protected]>
Hi. First of all I am unable to subscribe to synopsis list. I got "The
requested URL
/mailinglists.html was not found on this server" error.

On 8/2/05, Stefan Seefeld <[email protected]> wrote:

> I fear I'm getting a bit lost in all the involved (sub-)projects as we were
> originally talking about synopsis as a backend for pyste, but are now talking
> about gccxml, pygccxml, pyplusplus, etc.

Sorry, my fault. If you are going to modify pyste you are alone. If
you willing to share
your knowledge about synopsis and to show how to use internal synopsis
presentation then I am with you. I will implement bindings between synopsis and
pygccxml. See my whole answer.

> I couldn't quite figure out what the goal of pygccxml and pyplusplus is,
> and how that relates to synopsis. gccxml is a C/C++ parser, and synopsis
> contains a C/C++ parser, too, so I can see that in some cases where software
> depends on gccxml it may make sense to replace that with synopsis.
>

Small explanation: pygccxml consist from 2 parts: parser and classes
that describes
C++ declarations. Lets call them declarations classes.
The only parser that exists today is one based on GCC-XML. 
pyplusplus is code generator that does not envolved in parsing C++
source files at all.
pyplusplus describes its interface to user in terms of pygccxml
declarations classes.
So, theoretically, user could create declarations from some program
database and then
pass them to pyplusplus code generator. 

> However, from my little understanding it appears that pygccxml is - in terms
> of scope - more equivalent to synopsis as a whole, i.e. source code introspection.
> Why would you want to run on top of synopsis, then ?
I think, and please correct me if I am wrong, that synopsis is too low level. 
I , as code generator user, really do not want to deal with Parse Tree and AST. 
pygccxml provides you with high view - declarations. Why synopsis? -
cross platform, written in python, responsive and open mind author. It
uses boost.wave for prepossessing. And it seems to me that it based on
OpenC++ project, right? So it has all components to be good C++
parser.

>What is the advantage of
> mapping synopsis' own internal representations to pygccxml, of you could do
> the same introspection more efficiently inside synopsis ?

I believe that I can add an other parser to pygccxml, without changing
1 line of code in pyplusplus. "efficiently" is not an issue here.
 
> What advantage does pygccxml have over synopsis that suggests such an additional
> step ?

pyplusplus already use pygccxml declarations classes in its interface.
This is the only
advantage.

> > By the way pygccxml almost 80 unittests. So If I add synopsis as
> > back-end, I could be sure I did it right.
> 
> That's good. What do these tests cover ?

Almost every aspect of declarations reading. As input I give C++
source file, as output I get
C++ declarations. Testers checks that I got all expected declarations.

> Regards,
>                 Stefan
> 

Thanks
Roman Yakovenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.