This is the mail archive of the gcc-patches@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] |
(Oops -- I hit Send without adding the attachment. My apologies.) This patch is a prelude to future Objective-C++ work, but may also prove useful to those wishing to clean up the C++ front-end (see below). The cp/parse.y file is replaced with cp/cp-parse.in; the latter is then fed through a sed script to produce cp/cp-parse.y, analogously to how c-parse.y is produced from c-parse.in. The sed logic recognizes 'ifcp ... end ifcp' and 'ifobjcp ... end ifobjcp' markers for extracting code that is specific to C++ or Objective-C++, respectively. Again, this is completely analogous to how C and Objective-C parsers are constructed. Aside from these features, the patch contains no other functionality. It has bootstrapped successfully on i686-pc-linux-gnu, with no regressions. For the time being, Objective-C++ work is being done on the Darwin version of gcc3. The current patch will allow us to keep the Darwin tree in sync with the FSF tree as we move forward; without it, the periodic merges we do would become quite awkward. Also, having cp/cp-parse.in instead of cp/parse.y in the FSF tree will allow the C++ front-end to become more "isomorphic" (pardon my group theory) to the C front-end. Bringing the C and C++ front-ends closer together in this way should not only reduce the ongoing maintenance burden, but also make it easier to switch over to a unified front-end in the future. --Zem ============================================================== 2001-12-04 Ziemowit Laski <zlaski@apple.com> [gcc/cp/ChangeLog] * Make-lang.in: References to parse.[choy] become cp-parse.[choy]. (cp-parse.y): New rule, dependent on cp-parse.in. * lex.c: Include cp-parse.h rather than parse.h * pt.c: Likewise * spew.c: Likewise. * cp-parse.in: New file, replaces parse.y. (ifobjcp, ifcp): Insert C++ and ObjC++-specific %expect directives. * parse.y: Removed, replaced by cp-parse.in.
Attachment:
objc.diff.gz
Description: GNU Zip compressed data
-------------------------------------------------------------- Ziemowit Laski Apple Computer, Inc. zlaski@apple.com 2 Infinite Loop, MS 302-4SN +1.408.974.6229 Fax .1344 Cupertino, CA 95014-2085
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |