Re: Bootstraping compilers ?

David Spencer <spencer@panix.com>
Tue, 22 Apr 2008 16:05:51 +0000 (UTC)

          From comp.compilers

Related articles
[6 earlier articles]
Re: Bootstraping compilers ? lindahl@pbm.com (Greg Lindahl) (2008-04-18)
Re: Bootstraping compilers ? cdb@nullstone.com (Christopher Glaeser) (2008-04-19)
Re: Bootstraping compilers ? torbenm@app-4.diku.dk (2008-04-21)
Re: Bootstraping compilers ? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-04-21)
Re: Bootstraping compilers ? pocm@soton.ac.uk (2008-04-22)
Re: Bootstraping compilers ? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2008-04-21)
Re: Bootstraping compilers ? spencer@panix.com (David Spencer) (2008-04-22)
Re: Bootstraping compilers ? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-04-22)
Re: Bootstraping compilers ? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2008-04-23)
| List of all articles for this month |

From: David Spencer <spencer@panix.com>
Newsgroups: comp.compilers
Date: Tue, 22 Apr 2008 16:05:51 +0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
References: 08-04-059 08-04-066 08-04-080
Keywords: C, practice
Posted-Date: 22 Apr 2008 12:34:11 EDT

pocm@soton.ac.uk (Paulo Jorge de O. C. de Matos) writes:


>Chris Hills <chris@phaedsys.org> writes:
>> However once you have written a C99 compiler (using C95) you can then
>> write a C99 compiler and compile it with itself (after the first
>> compilation using the C99 compiler written in C95)


>Thanks you all for your replies. Chris, this is making me
>confused. Does your quote mean that I would have to write two
>compilers? One compiler in C95 and one in C99? So the first would
>accept C99, the second in C99 is then fed into the first?


It's not too hard to write a C99 parser that will also parse C95;
almost all valid C95 code is also valid C99 code, and will generate
the same object code. The differences are relatively easy to deal
with either in the scanner or in analyzing the parse tree.


--
dhs spencer@panix.com



Post a followup to this message

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