Error reporting bug in kdev-pg?
Andreas Pakulat
apaku at gmx.de
Fri Jul 13 11:32:38 UTC 2007
On 13.07.07 12:37:49, Roberto Raggi wrote:
> Hi Andreas,
>
> Il giorno 13/lug/07, alle ore 12:16, Andreas Pakulat ha scritto:
> > design, because thats the lookahead token. So what is it - bug or
> > feature?
>
> it's a feature ;-) it is the way LL works. LR parsers are different,
> they have the capability to detect an error at the earliest point
> (well, at least canonical LR)
So can I just do
size_t index = token_stream->index()-1;
token_type& token = token_stream->token(index);
to get "expected" error reporting? Or does that have possible bad
side-effects? (I personally can't see why it should, except if there's a
bug and it seems to work fine here)
Andreas
--
You will gain money by an immoral action.
More information about the KDevelop-devel
mailing list