|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)|
|Re: writing a compiler... email@example.com (Lex Spoon) (2003-06-25)|
|Date:||5 Jun 2003 23:13:27 -0400|
|Organization:||University of Newcastle upon Tyne|
|Posted-Date:||05 Jun 2003 23:13:27 EDT|
> some advice, some links, some trivial compilers to look at, some
> books, some exercises and so on...
> I am proficient in C and C++ so these are
> the languages I prefer to use to write code. However, I understand and
> I am able to "use" Pascal
I've been looking at a copy of "Writing Compilers and Interpreters: An
applied approach using C++ (2nd edition)" by Ronald Mak.
It walks through the implementation of a Pascal interpreter and x86
compiler in C++. Along the way, it includes small projects like a
pretty printer, and whatever.
It's a bit frustrating, I find it a bit slow, but I wish I had had it
when I was sixteen.
> I would like to write a Pascal compiler because Pascal is "formally
Mmph. In a round about, fudge it a bit here, kind of way....
IIRC it's Pascal that allows something like:
if f(a) and g(b) then ...
to evaluate f() and g() in either order.
But if f() and g() have side-effects such that the behaviour of the
program is determined by which executes first, then the program is
wrong. I don't think that's something that can be checked by a
compiler on an arbitrary program?
Incidently, I've seen a formal semantics of Java, by David von Oheimb
(maybe with Nipkow as well?) Oh, hang on...
http://www4.in.tum.de/~oheimb/papers/ and seen LNCS Vol 1523: Formal
Syntax and Semantics of Java.
I haven't had a chance to read it yet, but there's a copy round here
Return to the
Search the comp.compilers archives again.