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.