Re: Making my first compiler

Matthias Blume <blume@tti-c.org>
1 Dec 2006 11:53:41 -0500

          From comp.compilers

Related articles
[8 earlier articles]
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: Matthias Blume <blume@tti-c.org>
Newsgroups: comp.compilers
Date: 1 Dec 2006 11:53:41 -0500
Organization: private
References: 06-09-087 06-11-097 06-11-102 06-11-112 06-11-119 06-11-129 06-12-005
Keywords: design
Posted-Date: 01 Dec 2006 11:53:41 EST

Hans-Peter Diettrich <DrDiettrich1@aol.com> writes:


> Matthias Blume wrote:
>
>> What features of the language that you are trying to compile would
>> affect the choice of the language that one uses to write the
>> compiler?
>
> At least those features that prevent or discourage to write an compiler,
> using that particular language.
>
> A useful language should allow for things like:
> [general]
> - Turing completeness
> - arrays, dynamic memory and pointers/references
> - structured data types, or objects
> - structured statements (loops, subroutines...)
> - file handling (text and binary)
> [binary output]
> - low level (fixed size...) data types
> - logical operators (shift...)
> [compiler program]
> - multi-module source organization
> - usage of libraries
> - debugger
>
> I wouldn't suggest to write an compiler for tiny Basic in just that
> language ;-)


I am confused about what you are trying to say. Is your list of
features talking about the language that is being compiled or about
the language that the compiler is written in?


My point was that the language being compiled can be pretty much
anything and does not really affect the choice of language that the
compiler is written in. (That is, as someone else pointed out: modulo
issues such as constant folding etc. where the compiler has to emulate
representation, precision, and so on of the target.)


Post a followup to this message

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