Re: What makes a compiler, was Is Assembler

Hans Aberg <haberg_20080406@math.su.se>
Sun, 15 Feb 2009 00:48:33 +0100

          From comp.compilers

Related articles
Is Assembler Language essential in compiler construction? marco.m.petersen@gmail.com (2009-02-09)
Re: Is Assembler Language essential in compiler construction? haberg_20080406@math.su.se (Hans Aberg) (2009-02-11)
Re: Is Assembler Language essential in compiler construction? tony@my.net (Tony) (2009-02-14)
Re: What makes a compiler, was Is Assembler lkrupp@pssw.com (Louis Krupp) (2009-02-14)
Re: What makes a compiler, was Is Assembler haberg_20080406@math.su.se (Hans Aberg) (2009-02-15)
Re: What makes a compiler, was Is Assembler cr88192@hotmail.com (cr88192) (2009-02-16)
Re: What makes a compiler, was Is Assembler tony@my.net (Tony) (2009-02-15)
Re: What makes a compiler, was Is Assembler tony@my.net (Tony) (2009-02-15)
Re: What makes a compiler, was Is Assembler cr88192@hotmail.com (cr88192) (2009-02-19)
Re: What makes a compiler, was Is Assembler walter@bytecraft.com (Walter Banks) (2009-02-19)
Re: What makes a compiler, was Is Assembler cr88192@hotmail.com (cr88192) (2009-02-21)
| List of all articles for this month |
From: Hans Aberg <haberg_20080406@math.su.se>
Newsgroups: comp.compilers
Date: Sun, 15 Feb 2009 00:48:33 +0100
Organization: Aioe.org NNTP Server
References: 09-02-021 09-02-035 09-02-054
Keywords: design
Posted-Date: 15 Feb 2009 18:34:40 EST

Tony wrote:
>> Yes, formally a compiler just translates one computer language into
>> another. For example, an assembler translates into the machine code
>> language.
>
> I would say that is simply translation and not compilation because there is
> no intermediate representation. The IR (and the creation of it via
> lex/parse/semantic analysis before code generation) is what I think
> distinguishes compilers from interpreters and translators.


  From the formal point of view, all those translates one computer
language into another - they just have different practical form. From
what I checked, a compiler may have intermediate code, created typically
for achieving some machine independence, but is not required to have it.
    One book, by Robin Hunter, "Compilers...", says (p. 209) that the
procedure of translating intermediate code into machine code is
sometimes called translation in order to distinguish from the process of
producing intermediate code. The Haskell interpreter Hugs I think
produces some intermediate code which it interprets.


So I think that the word "compiler" can be used to denote computer
language translators in general, at least in formal discussions about
language translations.


      Hans Aberg



Post a followup to this message

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