This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Error repair in the C++ parser
- From: Ziemowit Laski <zlaski at apple dot com>
- To: gcc list <gcc at gcc dot gnu dot org>
- Date: Wed, 27 Jul 2005 12:42:03 -0700
- Subject: Error repair in the C++ parser
I'm fixing a problem with ObjC++ going beserk upon encountering
a syntax error, specifically not finding a '{' at the beginning
of a method definition. Is there a safe, established way of
repairing the token stream, i.e., inserting the '{' at that point?
That way, I could print an ObjC++-specific error message
(e.g., "missing `{' at beginning of Objective-C method definition"),
but then fix things up so that the generic C++ compound-statement
parsing logic doesn't get confused further.
Thanks in advance,
--Zem
--------------------------------------------------------------
Ziemowit Laski 1 Infinite Loop, MS 301-2K
Mac OS X Compiler Group Cupertino, CA USA 95014-2083
Apple Computer, Inc. +1.408.974.6229 Fax .5477