Re: Synopsis - tutorials

"Roman Yakovenko" <[email protected]> Fri, 27 Apr 2007 13:31:29 +0300
Newsgroups gmane.comp.documentation.synopsis
Message-ID <[email protected]>
On 4/27/07, Stefan Seefeld <[email protected]> wrote:
> If all you want are the declarations, the AST should be enough.

Yes, this is all I want. The exact requirements is here:
http://language-binding.net/pygccxml/declarations_uml.png
I saw similar diagram for Synopsis too. It could be nice to have
access to comments associated with declaration, but it is not a must.

>
> >     I do have some (experimental) code to expose the parse tree (etc.) to
> >     python using boost.python, and so I very much welcome any additional
> >     motivation to move further in that direction.
> >
> >     Any help would be highly appreciated.
> >
> >
> > I think I can help you with exposing the code to Python, just describe
> > what still should be done.
>
> The reflection itself is the easy part.

For me this is a part I will enjoy from :-)

> What is hard is to figure out how the API should look like to be useful

I can start using it and provide the feedback to you. If I understand
right the subject, than the best solution is not to have API at all. I
mean Parser Tree, could be a tree, with a lot of nodes. The only
needed API is "select" or "query".
http://language-binding.net/pygccxml/query_interface.html - this is
what I implemented for declarations tree. I've got very positive
feedback.

>, as well as finish the parser
> (anything related to type analysis, e.g. template instantiation, overload
> resolution, etc.).

I don't think I can help you here. Also I have question: why do you
write C++ parser in C++? Did you considered to write it in Python?

> Out of curiosity, what platform are you using ? (Your mail looks suspiciously
> like outlook-formatted.)

Gmail.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/