Related articles |
---|
writing a compiler... ltk_RE_MO_VE_@libero.it (Tommy) (2003-06-03) |
Re: writing a compiler... vrotaru@seznam.cz (Vasile Rotaru) (2003-06-05) |
Re: writing a compiler... m.a.ellis@ucsnew1.ncl.ac.uk (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... vbdis@aol.com (2003-06-20) |
Re: writing a compiler... Conor.ONeill.NoSpamPlease@logicacmg.com (Conor O'Neill) (2003-06-20) |
[1 later articles] |
From: | Vasile Rotaru <vrotaru@seznam.cz> |
Newsgroups: | comp.compilers |
Date: | 5 Jun 2003 22:54:18 -0400 |
Organization: | Compilers Central |
References: | 03-06-016 |
Keywords: | practice |
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
comp.compilers page.
Search the
comp.compilers archives again.