This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Error handling in the new C++ parser
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Andi Kleen <ak at muc dot de>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 30 Dec 2002 11:27:15 -0800
- Subject: Re: Error handling in the new C++ parser
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