This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Error handling in the new C++ parser
- From: Andi Kleen <ak at muc dot de>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 29 Dec 2002 18:16:38 +0100
- Subject: Error handling in the new C++ parser
Hi,
I looked at the new C++ parser in mainline and noticed there are lots
of unchecked cp_parser_require() in parser.c. Sometimes it checks
later using cp_parser_error_occurred(), but in many other cases
it doesn't.
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. I expect it will just become hopelessly confused in this
case then.
Can someone please expand a bit on how the syntax error recovery
is supposed to work ?
Thanks,
-Andi