New parser branch (Was: Dumping the source DOM?)

Steven T. Hatton hattons at
Wed Jul 13 19:24:06 UTC 2005

On Wednesday 13 July 2005 07:26, Vladimir Prus wrote:
> Roberto Raggi wrote:
> >> 2. You don't care if you parser can handle Boost. So basically, you're
> >> not trying to making your parser accept all possible C++ code, but only
> >> C++ subset you're interested in?
> >
> > it's all about priorities. I'm going to implement the features I need.
> > Boost is not a priority for me. Again, PLEASE TRY TO UNDERSTAND that it
> > is *impossible* to accept all the possible valid C++ code in KDevelop.
> Maybe you meant the opposite? That IDE should access invalid C++ code? If I
> have a valid C++ program, I'd expect IDE to parse it without problems.
> > We needs to understand/recover incorrect code. What do you think will be
> > the output of gcc-xml if the source code in the KDevelop's texteditor
> > looks like
> >
> > class X {
> >    void hello()
> >    {
> >         yy.             <<--- your cusrsor is here
> >         a_method_call_here();
> >
> >
> > a parser for a compiler expects complete code, while an IDE works on
> > incomplete code.
> One possible approach I had in mind was to make parser restartable. First
> you run g++ parser on the code till the first token it cannot parse. As you
> type more tokens you feed them to the parser. If you go to the beginning of
> the file and start typing there, you rewind parser state and start parsing
> again.

Do you guys even agree as to /why/ the boost is failing?  Vladimir, have you 
run the parser under gdb?  It may take a bit of doing to figure out who to 
feed it by hand, but I suspect that might turn up something useful.


More information about the KDevelop-devel mailing list