Re: Making my first compiler

Steve Murray <stevem@ans.com.au>
3 Dec 2006 21:34:00 -0500

          From comp.compilers

Related articles
[10 earlier articles]
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: Steve Murray <stevem@ans.com.au>
Newsgroups: comp.compilers
Date: 3 Dec 2006 21:34:00 -0500
Organization: Compilers Central
References: 06-09-087 06-11-097 06-11-102 06-11-112 06-11-119 06-11-129 06-12-005 06-12-017
Keywords: design
Posted-Date: 03 Dec 2006 21:34:00 EST

Matthias Blume wrote:
> 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.)


Yes, I think the conventional terminology used to remove confusion is ...


"Source Language" the language that the compiler will accept as input
for translation.


"Implementation Language" the language in which the compiler itself is
...., well, implemented.


Hth!



Post a followup to this message

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