Error reporting bug in kdev-pg?
roberto.raggi at gmail.com
Fri Jul 13 15:03:14 UTC 2007
Il giorno 13/lug/07, alle ore 13:32, Andreas Pakulat ha scritto:
> 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)
As I said before it is not a bug. btw I don't see why you want to do
that. In general the standard error message (when using LL) is
*** Unexpected token `foo' at (line, col).
and `foo' is the look-ahead token, so I really don't understand why
you want to use the last recognized token (the one at position
token_stream->index() - 1).
More information about the KDevelop-devel