[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-devel
Subject:    Re: New parser branch (Was: Dumping the source DOM?)
From:       "Steven T. Hatton" <hattons () globalsymmetry ! com>
Date:       2005-07-13 17:22:39
Message-ID: 200507131322.39734.hattons () globalsymmetry ! com
[Download RAW message or body]

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.

-- 
Regards,
Steven

_______________________________________________
KDevelop-devel mailing list
KDevelop-devel@barney.cs.uni-potsdam.de
http://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic