newsgroups-index (beta)

Current group: comp.compilers

ARM Compiler

ARM Compiler  
foaud167
 Re: ARM Compiler  
Peter Ilberg
 Re: ARM Compiler  
Jürgen_Kahrs
 Re: ARM Compiler  
Ivan Boldyrev
 Re: ARM Compiler  
Torben Ægidius Mogensen
 Re: ARM Compiler  
Dave Hansen
From:foaud167
Subject:ARM Compiler
Date:12 Jan 2005 22:58:24 -0500
Lately, I have been considering writing a compiler (just for the heck
of it). I decided that i will write it in java and produce ARM code,
but i haven't decided on the input language yet. i am thinking about
C. Any thoughts would be really great.
-fouad
From:Peter Ilberg
Subject:Re: ARM Compiler
Date:15 Jan 2005 20:53:05 -0500
Niklaus Wirth wrote a really nice book on compiler construction that
might be of interest to you. He explains the fundamentals of compiler
construction and builds a compiler for a subset of Oberon (a Pascal,
Modula-2 descendent) in about 120 pages. The book's out of print, but
he made a copy available for download for a class on compiler
construction:

http://www.cs.ucr.edu/~phf/mir/wirth-compiler-1996.pdf

You might find other useful links on the class website:

http://www.cs.ucr.edu/~phf/2005/winter/cs179e/

The complete source code for the Oberon compiler is available here:

http://www.cs.inf.ethz.ch/~wirth/books/CompilerConstruction/

And finally, Wirth describes the implementation of an Oberon
compiler for the Strong-ARM platform in this technical report:

ftp://ftp.inf.ethz.ch/pub/publications/tech-reports/3xx/314.ps

Peter
From:Jürgen_Kahrs
Subject:Re: ARM Compiler
Date:19 Jan 2005 22:13:01 -0500
Peter Ilberg wrote:

> Niklaus Wirth wrote a really nice book on compiler construction that
> might be of interest to you. He explains the fundamentals of compiler
> construction and builds a compiler for a subset of Oberon (a Pascal,
> Modula-2 descendent) in about 120 pages. The book's out of print, but
> he made a copy available for download for a class on compiler
> construction:
>
> http://www.cs.ucr.edu/~phf/mir/wirth-compiler-1996.pdf

If this is a legal copy of the book, you should send a notice about it
to these people who collect such links:

http://onlinebooks.library.upenn.edu/suggest.html

Their collection already contains links to Hoare's book about CSP,
Peyton Jones' tutorial about implementing functional languages and
Ait-Kaci's tutorial about Warren's Abstract Machine (Prolog).
From:Ivan Boldyrev
Subject:Re: ARM Compiler
Date:22 Jan 2005 18:27:42 -0500
On 8995 day of my life Jürgen Kahrs wrote:
> Peyton Jones' tutorial about implementing functional languages

PJ recently publised on-line his out-of-print book "The Implementation
of Functional Programming Languages". The text is different from
tutorial.

http://research.microsoft.com/%7Esimonpj/papers/slpj-book-1987/index.htm

Currently it is just set of JPEGs. More appropriate version will be
released soon.

--
Ivan Boldyrev
From:Torben Ægidius Mogensen
Subject:Re: ARM Compiler
Date:14 Jan 2005 00:41:47 -0500
"foaud167" writes:

> Lately, I have been considering writing a compiler (just for the heck
> of it). I decided that i will write it in java and produce ARM code,
> but i haven't decided on the input language yet. i am thinking about
> C. Any thoughts would be really great.

The choice of input language depends on what you want to achieve. As
I understand it, it is mostly for the learning experience. This makes
C a bad choice for several reasons:

1) It has an arcane syntax where parsing depends on knowing if a name
is a type name or a variable name and in other cases requires
unbounded lookahead.

2) The semantics of C is ill-defined.

So you would spend most of your time on the front-end and in trying to
figure out what the meaning of certain constructs are. See, for
example, the recent discussion about C compilers on the comp.sys.arm
newsgroup.

So, I would suggest a well-defined language with a simple syntax. You
could choose a suitably simple subset of C or Pascal. Pascal has an
easy-to-parse syntax (it was designed for LL(1) parsing), but some of
its features (nested scopes and procedure parameters) are nontrivial
(though not terribly so) to implement correctly.

You could also pick a language from a compiler textbook, as these are
designed to be relatively simple to compile while still teaching the
most important issues. Good examples of such include the Tiger
language from Andrew Appel's "Modern Compiler Implementation in ..."
books or the Triangle language from Watt & Brown's "Programming
Language Processors in Java".

Torben
From:Dave Hansen
Subject:Re: ARM Compiler
Date:14 Jan 2005 00:43:03 -0500
On 12 Jan 2005 22:58:24 -0500, "foaud167" wrote:

>Lately, I have been considering writing a compiler (just for the heck
>of it). I decided that i will write it in java and produce ARM code,
>but i haven't decided on the input language yet. i am thinking about
>C. Any thoughts would be really great.
>-fouad

There are enough C compilers already available for the ARM. Why
re-invent the wheel?

Just my opinion, but I would love to see a Modula-2 compiler.

Regards,

-=Dave
--
Change is inevitable, progress is not.
   

Copyright © 2006 newsgroups-index   -   All rights reserved   -   Impressum