Error handling in the new C++ parser
Mark Mitchell
mark@codesourcery.com
Mon Dec 30 13:51:00 GMT 2002
> There seems to be no effort to skip to a sychronizing token
> (like ';' or ')') after a normal syntax error, like the old bison
> parser did.
It does that when it wants to do that.
There's no need to attempt immediately recovery after missing one
required token; we can wait util it's convenient.
Look for functions with names like cp_parser_skip* to find places where
we skip ahead until something sensible shows up.
I'm sure the error recovery can be improved, but it does OK most of
the time.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc
mailing list