Re: Writing a compiler

Louis Krupp <lkrupp@pssw.com>
Mon, 03 Nov 2008 13:06:08 -0700

          From comp.compilers

Related articles
[8 earlier articles]
Re: Writing a compiler andresjriofrio@gmail.com (andresj) (2008-10-29)
Re: Writing a compiler kamalpr@hp.com (kamal) (2008-10-29)
Re: Writing a compiler tony@my.net (Tony) (2008-10-31)
Re: Writing a compiler lkrupp@pssw.nospam.com.invalid (Louis Krupp) (2008-11-01)
Re: Writing a compiler marcov@stack.nl (Marco van de Voort) (2008-11-02)
Re: Writing a compiler chris.dollin@hp.com (Chris Dollin) (2008-11-03)
Re: Writing a compiler lkrupp@pssw.com (Louis Krupp) (2008-11-03)
Re: Writing a compiler alexc@TheWorld.com (Alex Colvin) (2008-11-03)
Re: compiling C++ to C, was writing a compiler marcov@stack.nl (Marco van de Voort) (2008-11-04)
Re: compiling C++ to C, was writing a compiler alexc@TheWorld.com (Alex Colvin) (2008-11-04)
Re: Writing a compiler gneuner2@comcast.net (George Neuner) (2008-11-04)
Re: Writing a compiler gneuner2@comcast.net (George Neuner) (2008-11-04)
Re: compiling C++ to C, was writing a compiler barry.j.kelly@gmail.com (Barry Kelly) (2008-11-05)
[4 later articles]
| List of all articles for this month |

From: Louis Krupp <lkrupp@pssw.com>
Newsgroups: comp.compilers
Date: Mon, 03 Nov 2008 13:06:08 -0700
Organization: Compilers Central
References: 08-10-037 08-10-046 08-10-047 08-11-003 08-11-008 08-11-009
Keywords: C++
Posted-Date: 03 Nov 2008 16:49:25 EST

Marco van de Voort wrote:
> This is not true if e.g. all chars that can be used in C identifiers are
> also valid chars in C++. In assembler, usually a lot more special chars ($,@
> often) can be used to separate the parts in a mangled name.
>


I suspect we may be all talking about different things.


Tony said, "From what I've read, it seems that CFront couldn't implement
the whole language."


I said I thought it could, at least theoretically, although modern
compilers which implement the current standard all compile to machine code.


I'm not talking about whether or not mangled names could be imitated by
C code which could be built with C++ code to produce surprising results.
    It's not something that's likely to happen by accident -- mangled
names tend to be really ugly -- but if one were perverse enough, it
would be possible. And if it couldn't be done in C, it could probably
be done in assembler, which as you noted offers more ways to build names.


But then I've heard the syntax of C++ itself described as perverse.


Louis



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.