Related articles |
---|
[Question] Code Generation of OOP languages baby@adam.kaist.ac.kr (S.R.SEO) (1999-12-01) |
Re: [Question] Code Generation of OOP languages hoeppner@ipd.uni-karlsruhe.de (hoeppner) (1999-12-03) |
RE: [Question] Code Generation of OOP languages mikael@pobox.com (Mikael Lyngvig) (1999-12-03) |
Re: [Question] Code Generation of OOP languages anton@mips.complang.tuwien.ac.at (1999-12-07) |
Re: [Question] Code Generation of OOP languages ghoul@ibm.net (Mark van Gulik) (1999-12-20) |
From: | "Mark van Gulik" <ghoul@ibm.net> |
Newsgroups: | comp.compilers |
Date: | 20 Dec 1999 23:32:05 -0500 |
Organization: | Global Network Services - Remote Access Mail & News Services |
References: | 99-12-017 |
Keywords: | OOP, question |
[example translation from C++ to C elided]
>The code above hasn't been tested (compiled and executed), but it
>should give you a good idea of how to get from C++ to C. Getting from
>C to assembly is just a question of traditional compiler technology
>and is described in lots of books.
You may be surprised to hear that the old C++ compilers actually did
this type of source code preprocessing so that existing C compilers
could be used. I assume this manipulation occurred at the abstract
syntax tree level, and was then pretty-printed (or more usually
"ugly-printed") back as C source code.
[The original cfront compiler generated C code. Were there any others?
-John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.