Bug in C++ parser

Daniel Berlin+mail.misc dan at cgsoftware.com
Thu Mar 23 18:22:51 GMT 2000


Ralf Nolden <Ralf.Nolden at post.rwth-aachen.de> writes:


> "Daniel Berlin+mail.misc" wrote:
> 
> > I can make a patch if you like, it'll take me about 5 minutes.
> > --Dan
> Sure, just go on and send it over; I´ll put it into cvs then. I just
> tested it with one project I had (modified kscan+kscribble=kscanner)
> which had extern "C" to include sane.h. In my project the class methods
> were displayed as global methods and after adding it to the tokenizer.l
> they showed up, so I didn´t dive into detail with this thingy...;-)
> 

Well, technically, that's wrong.
The main thing about extern blocks is they change the namespace of
what is in them.
extern "C" puts something in the C namespace.

Parsing C++ is a bitch.
:)


> waiting for your patch....
> 
> Ralf
> 
> PS: when you´re on the way, could you have a look for that bug where
> more than one attribute declaration is not correctly parsed ?
> e.g. 
> 
> QString name,location;  not showing anything where
> QString name;
> QString location; shows both. ??? ;-)

Not as easy to do.
Well, not true, it's just as easy to fix, but you pay a lookahead
cost.

I'll look into it, but you won't get a patch for it for another few
hours (which is relatively long for me).
--Dan




More information about the KDevelop mailing list