Re: how to write a compiler

suresh@sankhya.com (Suresh Kumar J)
31 Jul 2003 12:46:18 -0400

          From comp.compilers

Related articles
[2 earlier articles]
Re: how to write a compiler bonzini@gnu.org (2003-07-04)
Re: how to write a compiler martinez_miguel@yahoo.com (2003-07-13)
Re: how to write a compiler mrmnews@the-meissners.org (Michael Meissner) (2003-07-15)
Re: how to write a compiler bonzini@gnu.org (2003-07-17)
Re: how to write a compiler alex@alexmcguire.com (Alex McGuire) (2003-07-25)
Re: how to write a compiler nicolas_capens@hotmail.com (2003-07-31)
Re: how to write a compiler suresh@sankhya.com (2003-07-31)
Re: how to write a compiler ertr1013@student.uu.se (Erik Trulsson) (2003-08-04)
Re: how to write a compiler boldyrev+nospam@cgitftp.uiggm.nsc.ru (Ivan Boldyrev) (2003-08-10)
Re: how to write a compiler p2sam@uwaterloo.ca (2003-08-15)
Re: how to write a compiler christian.bau@cbau.freeserve.co.uk (Christian Bau) (2003-08-20)
Re: how to write a compiler arargh308@arargh.com (2003-08-23)
| List of all articles for this month |

From: suresh@sankhya.com (Suresh Kumar J)
Newsgroups: comp.compilers
Date: 31 Jul 2003 12:46:18 -0400
Organization: http://groups.google.com/
References: 03-07-009
Keywords: practice
Posted-Date: 31 Jul 2003 12:46:18 EDT

Hello,


> 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??)....plus 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.


To start with I suggest to read the Dragon book and "Modern Compiler
Implementation using C" by Appel.


BTW, To the best of my knowledge, a lot of compiler projects are being
taken up by students as their academic projects. Why not trying to
write a tool in the decompiler or binary translator domain ? Its just
the reverse process of a compilation !


May be you can write an object dumper which dumps object code of a
particular processor/file format. You can upgrade it to support more
targets/file formats based on the time availability. Think about it.


Regards,
Suresh


--
Suresh Kumar J suresh@sankhya.com
Sankhya Technologies Private Limited http://www.sankhya.com


[I suspect that if you were to write your compiler in a language like
Perl or Scheme rather than C, doing it in six months wouldn't be all
that hard. When I was an undergrad 30 years ago (egad!) I wrote a
surprisingly good APL->Basic compiler as a class project that did a
bunch of loop combining optimizations that I didn't realize were then
beyond the state of the art. But I wrote the compiler in Trac, which
can be an extremely productive language if your brain works that
way. -John]



Post a followup to this message

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