How do I make my own programming language?
I know that's a very big question to ask, but does anyone know of some websites or books that would give you at least the basics of writing your own language/compiler?
If your interested you can follow this website I have put up for specifications for a new language. CodeBASIC . Also looking for input and feedback, so your more than welcome to post questions.
Depends on what exactly you mean.
Making a programming language is easy. Just sit down with a piece of paper, and write a few rules down for the language. Then that's a (probably very ambiguous, and not very useful) language specification.
If you want to write a compiler or interpreter for the language, it's a lot more complex. ;)
But then it's basically the same as writing those for an existing language.
Making a programming language is easy. Just sit down with a piece of paper, and write a few rules down for the language. Then that's a (probably very ambiguous, and not very useful) language specification.
If you want to write a compiler or interpreter for the language, it's a lot more complex. ;)
But then it's basically the same as writing those for an existing language.
Sorry, should have posted a helpful link:
Compiler Construction using Flex and Bison
http://cs.wwc.edu/~aabyan/464/Book/
I would say that this is not for the faint of heart.
Compiler Construction using Flex and Bison
http://cs.wwc.edu/~aabyan/464/Book/
I would say that this is not for the faint of heart.
The "Dragon Book" is very good. It's actual name is "Compilers: Principles, Techniques, and Tools", by Alfred V. Aho, Ravi Sethi and Jeffrey D. Ullman. It may be a bit dated in some areas, but it's still the canonical reference book for anyone wanting to create a compiler (or interpreter).
I'm currently taking translators (which is basically introduction to writing compilers). And it is certainly not for the faint of heart, but it is a fantastic thing to understand. Knowing things like parse trees and syntax directed translation help you think like your compiler, and you can more readily understand why things are implemented the way they are in todays languages. I agree with the previous posts suggesting Flex/Bison (some times refered to as lex/yacc which were very similar beasts from way back when). The standard as far as books on compilers is concerned is still "Compilers: Principles, Tools, and Techniques" by Alfred V Aho, Et. Al. (ISBN 0201100886), although it was written in 1986. Best of luck in your studies.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement