Re: Compiler project needed

torbenm@diku.dk (Torben AEgidius Mogensen)
22 Feb 2000 09:32:03 -0500

          From comp.compilers

Related articles
Compiler project needed pel@realtime.dk (Per Olesen) (2000-02-22)
Re: Compiler project needed paulyg@clara.net (2000-02-22)
Re: Compiler project needed dstarner98@aasaa.ofe.org (2000-02-22)
Re: Compiler project needed cbrtjr@ix.netcom.com (Charles E. Bortle, Jr.) (2000-02-22)
Re: Compiler project needed torbenm@diku.dk (2000-02-22)
Re: Compiler project needed escargo@mirage.skypoint.com (2000-02-23)
Re: Compiler project needed sasulzer@seanet.com (Stephen Sulzer) (2000-02-23)
Re: Compiler project needed jkahrs@castor.atlas.de (Juergen Kahrs) (2000-02-23)
Re: Compiler project needed danwang+news@cs.princeton.edu (Daniel C. Wang) (2000-02-27)
Re: Compiler project needed dvdeug@x8b4e53cd.dhcp.okstate.edu (2000-02-27)
Re: Compiler project needed srineet@email.com (Srineet) (2000-02-27)
[6 later articles]
| List of all articles for this month |
From: torbenm@diku.dk (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 <pel@realtime.dk> 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
allocation).


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
efficiency.


Torben Mogensen (torbenm@diku.dk)


Post a followup to this message

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