From: Joel Reymont
Subject: writing a compiler in lisp vs other languages
Date: 
Message-ID: <ab7adc30-b031-40f3-b29c-15a80062cf41@k8g2000yqn.googlegroups.com>
I'm writing a compiler for a Pascal-like trading language in Lisp. I
have already written this compiler in OCaml.

Would someone with experience in writing compilers in Lisp and other
languages share their opinion about the advantages of Lisp for writing
compilers?

Note, the source language is not Lisp-like!

    Thanks, Joel
From: Pascal J. Bourguignon
Subject: Re: writing a compiler in lisp vs other languages
Date: 
Message-ID: <7cocuygf4c.fsf@pbourguignon.anevia.com>
Joel Reymont <······@gmail.com> writes:

> I'm writing a compiler for a Pascal-like trading language in Lisp. I
> have already written this compiler in OCaml.
>
> Would someone with experience in writing compilers in Lisp and other
> languages share their opinion about the advantages of Lisp for writing
> compilers?

Basically, the same advantages as for writing any other program, just more so.
(That is, if you write the other programs in the most lispy ways, with DSLs).

Ok, one of the main advantage is that instead of compiling to some
random inferior processor, you can compile to lisp, and benefit of the
compiler writers' know how embedded in your lisp implementation.


> Note, the source language is not Lisp-like!

Doens't matter.  
The first step is to transform the source syntax into sexps.
Then we fall back to demonstrated theorem.


-- 
__Pascal Bourguignon__