Patch for sC++ to GNU C++.
Jan Madsen
Jan.Madsen@epfl.ch
Fri Oct 23 04:36:00 GMT 1998
Joe Buck wrote:
>
> >
> > >>>>> "Joe" == Joe Buck <jbuck@Synopsys.COM> writes:
> >
> > Joe> Please cd to gcc/objc and look around. Do you see
> > Joe> duplication? No, you only see six source files. The only
> > Joe> duplication is in objc-parse.y: it and c-parse.y are both
> > Joe> obtained from c-parse.in.
>
> Mark writes:
>
> > I agree with you. Thank you for making me pay attention long enough
> > to see what was really going on.
>
> Convergence may be possible. :-)
>
> So, Jan, I guess what I am asking is for you to restructure your patch so
> that it looks like the way objc is built on top of C. If I understand
> things correctly, only the bison input needs changing, right, so it is
> analogous to Objective-C?
>
> (I can't promise, of course, that your changes would then be accepted,
> that's up to Jason and Jeff -- but it would make it more likely, I think).
I will put my extension into a separate directory. However, I would very
much like to hear the opinion of Jason or Jeff concerning this work and
to know which version of GCC a patch should be made against.
The work, I will do, will then resume to this:
Creating a cp/parse.in file common for both C++ ans sC++ like the
C/Objective-C parser file. This file will probably only contain one or
two special rules for C++ (if any), the rest of the special rules will
be for sC++.
The sC++ will also need to modify the gxx.gperf file, however this can
be done simply by copying the cp/gxx.gperf file (when configuring the
compiler) and appending the special sC++ keywords to the copied file.
Creating an 'sc' sub-directory to 'cp' and place my files in there.
Creating a Makefile and configure file in this directory.
There is, however, a couple of things I do not know how to do. If you
could explain to me how it is done and/or point me to the places where a
similar thing is done it will ease my task very much. First, can you
point me to the place where the 'sed' command manipulates the c-parse.in
file. Second, I have modified the file cp/lang-specs.h to accept the
extensions '.scc' and '.scxx', where does this change go (into the gcc
main program? how?)? It is simply the source file extensions that needs
description, otherwise I can use the same code as in the cp/lang-specs.h
(using, for example, the compiler name cc1scpp instead of cc1plus).
I will probably also need to ask some questions concerning the configure
and makefiles later (when I creates these files). I will, however, first
try to figure out these myself.
Regards,
Jan Madsen
PS. We have an article describing the possibilities of this extension in
the
September 1998 issue of IEEE Computer (written by Claude
Petitpierre, EPFL).
If you are interested I am prepared to come to the USA and help
integrating
the sC++ extension.
------------------------------------------------------------------------
Computer Networking Laboratory - Laboratoire de Teleinformatique
Computer Science Department - Departement d'Informatique
Swiss Federal Institute of Technology - Ecole Polytechnique Federale
1015 Lausanne, Switzerland
email: Jan.Madsen@epfl.ch
Tel. 021 / 693 47 97
Fax. 021 / 693 66 00
http://ltiwww.epfl.ch/~madsen
------------------------------------------------------------------------
More information about the Gcc
mailing list