This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]