Re: Compiler project needed (Torben AEgidius Mogensen)
22 Feb 2000 09:32:03 -0500

          From comp.compilers

Related articles
Compiler project needed (Per Olesen) (2000-02-22)
Re: Compiler project needed (2000-02-22)
Re: Compiler project needed (2000-02-22)
Re: Compiler project needed (Charles E. Bortle, Jr.) (2000-02-22)
Re: Compiler project needed (2000-02-22)
Re: Compiler project needed (2000-02-23)
Re: Compiler project needed (Stephen Sulzer) (2000-02-23)
Re: Compiler project needed (Juergen Kahrs) (2000-02-23)
Re: Compiler project needed (Daniel C. Wang) (2000-02-27)
Re: Compiler project needed (2000-02-27)
Re: Compiler project needed (Srineet) (2000-02-27)
[6 later articles]
| List of all articles for this month |

From: (Torben AEgidius Mogensen)
Newsgroups: comp.compilers
Date: 22 Feb 2000 09:32:03 -0500
Organization: Department of Computer Science, U of Copenhagen
References: 00-02-112
Keywords: design, courses

Per Olesen <> writes:

>I'm studying computer science on a Danish university and I'm going to
>write a compiler as a project in a course I'm taking.

You don't mention the size of the project you want to do. Writing a
full Java compiler is a fairly sizeable task, and probably not
something you would do as part of a course, so I assume somewhat
smaller projects than that.

You also dont mention if you want to concentrate on front-end issues
(parsing, type inference, intermediate-code generation) or back-end
issues (optimisation, code-generation, scheduling, register

Anyway, here are a few suggestions:

Mostly front-end: Part of the success of Java is the C-like syntax.
Design a C-like syntax for SML and write a tool that converts this
into "real" SML and translates error messages from the SML compiler
into terms that relate to the C-like program.

Also mostly front-end. There are variants of ASP (active server pages)
for many languages, including Java and SML. Choose a language that
does not currently have an ASP-like variant and make one.

Mostly back-end: Make a compiler (for a small language) that generates
efficient code for an 8-bit processor (e.g. 6502 or Z80). Note that
this may require different strategies for register allocation and
parameter passing than the standard compiler textbooks show.

Also mostly back-end: Make two compilers: One that compiles
stack-based code into register-based code and one that goes the other
way. Make them such that using these to compile from stack to register
and back again (or vice-versa) loses as little as possible in

Torben Mogensen (

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.