Re: how to write a compiler

Christian Bau <>
20 Aug 2003 01:22:23 -0400

          From comp.compilers

Related articles
[6 earlier articles]
Re: how to write a compiler (Alex McGuire) (2003-07-25)
Re: how to write a compiler (2003-07-31)
Re: how to write a compiler (2003-07-31)
Re: how to write a compiler (Erik Trulsson) (2003-08-04)
Re: how to write a compiler (Ivan Boldyrev) (2003-08-10)
Re: how to write a compiler (2003-08-15)
Re: how to write a compiler (Christian Bau) (2003-08-20)
Re: how to write a compiler (2003-08-23)
| List of all articles for this month |

From: Christian Bau <>
Newsgroups: comp.compilers
Date: 20 Aug 2003 01:22:23 -0400
Organization: Compilers Central
References: 03-07-009 03-07-212 03-08-044 03-08-045
Keywords: design, practice
Posted-Date: 20 Aug 2003 01:22:23 EDT (Pedro Sam) wrote:

> Ivan Boldyrev <> wrote:
> > On 8456 day of my life Suresh Kumar J. wrote:
> >>> i'm taking up a 6 month term project in my bachelor's degree
> >>> course.can someone tell me the roadmap for writing a complier.and also
> >>> suggest the language(maybe c,java etc..or develop a custom
> >>> lang??) is it a good idea to try for translators(c to
> >>> java,MSIL to java bytecode etc...)in the same semester??
> >>> samy
> >>
> >> Writing a compiler in 6 months by a single person may not be possible.
> >> You may want to try a part of it.
> >
> > JFYI: some student in South America (AFAIR) wrote C compiler in
> > Haskell in 6 months. May be, it is foundable by Google :)
> Legend has it, a few terms back, some students from Waterloo taking
> cs444 wrote a C compiler in 3 months which is complete and correct
> enough to compile and play Doom.

Many years ago, a copy of the Byte magazine contained source code for a
toy Pascal compiler. First stage translated to something similar to
P-code, second stage compiled to 8080 assembler (I said many years ago).
I typed it in, making all the necessary changes so it would run on
Commodore BASIC, and after two days it did compile and execute tiny
pascal programs.

I didn't say it compiled them fast and executed them fast :-)

Post a followup to this message

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