Compiler Creation
I would like to build a compiler in C++. I have sort of created a parser, but don't know what to do. Please help me and point me to places where this has been done. I think I know what I am getting myself into, so I am okay with taking a long time.
Principles of Compiler Design is avaliable pretty cheap on Amazon.
You can get a free PDF copy of Basics of Compiler Design
You can find other resources here
You can use tools like Bison, Lex, and Yacc to do some of the work for you. Given a grammar defintion, usually in Backus Naur Form, they'll output code for a parser and lexical analyzer for that grammar.
You can get a free PDF copy of Basics of Compiler Design
You can find other resources here
You can use tools like Bison, Lex, and Yacc to do some of the work for you. Given a grammar defintion, usually in Backus Naur Form, they'll output code for a parser and lexical analyzer for that grammar.
The famous, "Lets build a compiler" series by Jack Crenshaw.
http://compilers.iecc.com/crenshaw/
Its a quick and practical guide to building a compiler. Not overly done with theory. Which helped me ease into things I think.
http://compilers.iecc.com/crenshaw/
Its a quick and practical guide to building a compiler. Not overly done with theory. Which helped me ease into things I think.
I would think that if you have to ask that question, you aren't ready to make a compiler. A compiler is probably one of the most difficult software projects to undertake, next to an MMOG and an operating system.
Dude: don't do it. Instead, embed a python or Lua interpreter. Creating a compiler is what you do if you want to create a new programming language.
Quote:Original post by Mike.Popoloski
I would think that if you have to ask that question, you aren't ready to make a compiler. A compiler is probably one of the most difficult software projects to undertake, next to an MMOG and an operating system.
Yeah I have a book on how to make your own compiler in vb.net and that was complicated enough.
Quote:Original post by billmason
Is C++ an okay language for compiler design or is there a better alternative?
It's 'okay'. I tend to favor O'Caml as a compiler development language, mostly because this is what it was created for in the first place (and it's pretty darn good at it, too).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement