Compiler Building

Where can I find the best ONLINE resources for building compilers?
I am not interested in Lex, Yacc company. I need to build a small C compiler by hand from the beginning to the end.
Thanks,
God bless you,
Greg
gregclauAsked:
Who is Participating?
 
abdijConnect With a Mentor Commented:
Hi,
  On what platform do you want to develop?

Whatever be it Hope this helps

Tools for Compiler Writing:
http://www.greymatter.co.uk/gmWeb/Nodes/NODE0143.HTM

Book
1. Compiler Writing Made Easy by Charles G. Petersen
http://www2.netdoor.com/%7Epetersen/pmpub/ctoc.cwme.html 

Links

1. http://www.softpanorama.org/Bookshelf/compilers.shtml   
2. http://www.first.gmd.de/cogent/catalog/kits.html   
3.http://www.ddj.com/articles/1999/9903/9903h/9903h.htm  
4.http://www.cs.nps.navy.mil/curricula/tracks/security/
5. http://www2.netdoor.com/~petersen/pmpub/preface.cwme.html   
6.  http://dkiong.comp.nus.edu.sg/compilers/prelude.html  
7. http://cs.ru.ac.za/homes/cspt/compbook.htm  -  10/29/1999  
 
All the best,
Bye
If any thing else comes along i will pass it to you.

Bye
Abdij
0
 
gregclauAuthor Commented:
Main emphasis on building the Lexical Analizer and the Parser
0
 
jhanceCommented:
Why online only?  Are you too cheap or lazy to read/buy a book?

The best resource I've ever read is a book by James Hendrix about his SmallC compiler for the X86 processor.  I followed a series of articles in DDJ in the early '90s.  It included a great description of how the thing works and had full source code to the compiler that could compile itself.

I'm not going to bother digging up any more information on it since you want ONLINE only but I thought I'd mention it...
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
viktornetCommented:
jhance, not all people are as rich as you are... im sorry i had to say that, but that's just the way it is!
0
 
graham_kCommented:
not even rich with points, it seems :-)  20 points for how to build a compiler !
0
 
graham_kCommented:
not even rich with points, it seems :-)  20 points for how to build a compiler !  (BTW, the answer *is* to use Lex/Yacc).

Did you try a search engine? "Compiler Writing" brought a bunch of hits, even on a search of page titles only. As did "compiler building".  O.K, a bunch of them are book reviews, so you can throw them out. It seems that you want us to wade through the search engine hots for you, for a measly 20 points.

Btw, that came over as a nasty dig at viktomet (isn't it always the way in print, rather than in person)?). I'd say that if you are capable of writing a compiler, then you're capable of getting a programming job & then shelling out 20 or 30 bucks for a book (or skip a few smokes or drinks; life's about compromises).
0
 
jhanceCommented:
viktornet,

>jhance, not all people are as rich as
>you are... im sorry i had to say that,
>but that's just the way it is!

While it may be true that not all people are as rich as I am, I'm not proposing a major expenditure either.  Even the most expensive programming books are US$50-$60 and if even that is prohibitive, virtually all such book are available absolutely FREE at many public libraries!!
0
 
viktornetCommented:
60 bucks is quiet a bit for me... yes, library is a good idea but they dont have all the books and are not up to date.. new books are brought an year or more after the release of the book so you're never up to date (usually)...

graham, stop being greedy and try to help out the individual...

gregclau, why dont you try out http://www.programmersheaven.com/

i think they have a tutorial on how to build a simple compiler (but the tutorial is for pascal programmers.. so if you know pascal you'll be on your way to building your own compiler)...

..-=ViKtOr=-..
0
 
graham_kCommented:
who's being greedy? I don't want/need any more points. It's just that when some college kid asks us to do his homework, we ask to see what code he's already written. I'd just like you to say "I've tried all search engines & trawled UseNet and I found nothing" (which I doubt would be true).  *Have* you tried UseNet - http://www.deja.com  ?

Just to show that I'm a nice guy, I''ll see what I can find, but will refuse any points.
0
 
dhymesCommented:
No need to buy a book, all the info is on line. The easiest way to accomplish this task is to use Lex/Yacc as graham_h pointed out, unless you are just hard core and want to write your own state machine.

0
 
jjmcdCommented:
> library is a good idea but they
> dont have all the books and are
> not up to date..

Up to date really doesn't matter in this space - compiler theory that is not proprietary hasn't changed much, if at all, in the past 20 years or so.

In my mind, the very best book I've seen is "A Compiler Generator" by McKeeman, Horning and Wortman - Prentice Hall. (Pretty darned old, too).  I know this isn't a net resource, but it is something you are likely to find in the library.

Now they are hawking an old mainframe compiler generating program, *BUT* before they get to that, they go through, step by step, what you need to do to write a compiler.  Reading the first few chapters and doing the exercises will allow you to attack your small C compiler with confidence.
0
All Courses

From novice to tech pro — start learning today.