Re: What makes a compiler, was Is Assembler

"Tony" <tony@my.net>
Sun, 15 Feb 2009 21:15:50 -0600

          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: "Tony" <tony@my.net>
Newsgroups: comp.compilers
Date: Sun, 15 Feb 2009 21:15:50 -0600
Organization: at&t http://my.att.net/
References: 09-02-021 09-02-035 09-02-054 09-02-069
Keywords: design
Posted-Date: 16 Feb 2009 04:35:41 EST

"Louis Krupp" <lkrupp@pssw.com> wrote in message
> Tony wrote:
>> "Hans Aberg" <haberg_20080406@math.su.se> wrote in message
>>> marco.m.petersen@gmail.com wrote:
>>>> I mean, if you wrote a program that converts code from BASIC to C++
>>>> then calls another compiler to do the compilation process, wouldn't
>>>> that be considered as a compiler?
>>> 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.
>
> I wouldn't say that. I can't speak to modern Unisys MCP-Series
> software, but most Burroughs compilers used a single pass that read
> source code and emitted machine code. There was no intermediate
> representation.


I'd call that translation then if indeed it didn't internally produce some
IR. It sounds like programming the machine at a macro level is all.
[No, see note at end. -John]


> An intermediate representation might enable translation from more source
> languages to a wider range of target architectures and with better
> optimization, but from the definitions I've seen, a compiler is a
> program that translates source code to machine code. The implementation
> details are interesting but are not part of the definition.


I'll have to disagree with you. Where have you seen the definition of
'compiler' as "a program that translates source code to machine code"?
Surely today, that is invalid even if it ever was valid.


Tony
[The Burroughs compilers are real Algol compilers. If you're not worried
about optimization, it's quite possible to generate adquate code on the
fly from each grammar rule. See Irons classic 1961 paper on Syntax
Directed Translation. -John]



Post a followup to this message

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