Re: Making my first compiler

torbenm@app-3.diku.dk (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=)
29 Nov 2006 10:59:29 -0500

          From comp.compilers

Related articles
[5 earlier articles]
Re: Making my first compiler jeffrey.kenton@comcast.net (Jeff Kenton) (2006-09-25)
Re: Making my first compiler firefly@diku.dk (Peter \Firefly\Lund) (2006-09-25)
Re: Making my first compiler monnier@iro.umontreal.ca (Stefan Monnier) (2006-11-23)
Re: Making my first compiler ValdoFerrari@libero.it (Valdo Ferrari) (2006-11-24)
Re: Making my first compiler torbenm@app-0.diku.dk (2006-11-27)
Re: Making my first compiler z2345678998765432y@sbcglobal.net (John) (2006-11-29)
Re: Making my first compiler torbenm@app-3.diku.dk (2006-11-29)
Re: Making my first compiler blume@tti-c.org (Matthias Blume) (2006-11-29)
Re: Making my first compiler DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-12-01)
Re: Making my first compiler blume@tti-c.org (Matthias Blume) (2006-12-01)
Re: Making my first compiler DrDiettrich1@aol.com (Hans-Peter Diettrich) (2006-12-03)
Re: Making my first compiler stevem@ans.com.au (Steve Murray) (2006-12-03)
| List of all articles for this month |

From: torbenm@app-3.diku.dk (=?iso-8859-1?q?Torben_=C6gidius_Mogensen?=)
Newsgroups: comp.compilers
Date: 29 Nov 2006 10:59:29 -0500
Organization: Department of Computer Science, University of Copenhagen
References: 06-09-087 06-11-097 06-11-102 06-11-112 06-11-119
Keywords: practice
Posted-Date: 29 Nov 2006 10:59:29 EST

John <z2345678998765432y@sbcglobal.net> writes:




> Rather than just picking out a language in which to write a compiler,
> it would be advisable to fully understand the features and
> requirements of the programming language you are trying to compile.


I find that the language in which you write your compiler doesn't need
to have any relationsship with the langauge you compile. Just about
the only case where it would help is when statically evaluating
constant expressions, where having the same precision and rounding
rules as the source language makes it easier to get exactly the same
result. Of course, if you want to bootstrap your compiler, you will
write it in the same language you compile, but I find that there are
less and less valid reasons for doing so on modern computers.


Torben



Post a followup to this message

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