954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to Create a simple Compiler

Hi, im new here, and i want to ask about "how to make a compiler". I'm a Computer Science and part of my subject wants me to create a compiler, and I had no idea of how to create one. Can anyone help me.....

Seiko09
Newbie Poster
1 post since Oct 2011
Reputation Points: 11
Solved Threads: 0
 

This question really has a very complex answer:-
1) First of all you req very good knowledge of 'lexical' 'analysis',
'parsing', 'grammar', etc.

And there is no use of writing C++ compiler in c++. You should learn some low level language.

Many universities offer courses where you get to create a compiler.

The "Dragon book",

is a good place to start for learning about writing compilers.

For learning C++, on the other hand, it very much depends on what you already
know. If you are proficient in some other programming language then the
recommended book is "Accelerated C++" by Koenig.

sundip
Junior Poster
104 posts since Aug 2010
Reputation Points: 14
Solved Threads: 24
 

A good starting point is Jack Crenshaw's "Let's Build a Compiler!"
http://www.penguin.cz/~radek/book/lets_build_a_compiler/

vijayan121
Posting Virtuoso
1,606 posts since Dec 2006
Reputation Points: 1,159
Solved Threads: 287
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You