|writing a compiler... ltk_RE_MO_VE_@libero.it (Tommy) (2003-06-03)|
|Re: writing a compiler... firstname.lastname@example.org (Vasile Rotaru) (2003-06-05)|
|Re: writing a compiler... email@example.com (2003-06-05)|
|Re: writing a compiler... JeffKenton@attbi.com (Jeff Kenton) (2003-06-05)|
|Re: writing a compiler... cfc@shell01.TheWorld.com (Chris F Clark) (2003-06-05)|
|Re: writing a compiler... Steve_Lipscombe@amat.com (2003-06-08)|
|Re: writing a compiler... firstname.lastname@example.org (2003-06-20)|
|Re: writing a compiler... Conor.ONeill.NoSpamPlease@logicacmg.com (Conor O'Neill) (2003-06-20)|
|[1 later articles]|
|From:||Vasile Rotaru <email@example.com>|
|Date:||5 Jun 2003 22:54:18 -0400|
|Posted-Date:||05 Jun 2003 22:54:18 EDT|
On 3 Jun 2003 00:45:00 -0400
"Tommy" <ltk_RE_MO_VE_@libero.it> wrote:
> While I am learning the theory I need to keep motivated by doing some
> practice... As a result, I would love to write some very trivial
> compilers while I am studying those couple of theoretical books...
A compiler for very simple language will be probably the one for the
first-order logic. Just TRUE and FALSE and the usual logic operations.
No variables. You may want to write and "interpreter" for this
language or try to compile it to C/Perl/VB.
This example language and more simple ones can be found in
"Programming Languages" by Scott Smith & Mike Grant and this can be
(probably) get from <http://www.cs.jhu.edu/~scott/plbook>. At least,
this URL stands on its front page.
This book assumes O'caml as an implementation language and is
"functionally biased", but if the only thing you want are some example
languages this will do. I have written intrepreters for two of this
languages using Coco/R.
hope this helps. A newbie too, rv.
Return to the
Search the comp.compilers archives again.