Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a basic programming language - resources? [closed]

I don't know if this is the right SE site for this question, if not, I would appreciate anyone who could point me in the right direction.

For my college project (UK college ~ high school) I want to design a basic programming language. It won't have all the necessary functionality, but enough to write some basic programs on the Console. I want to make it interpreted as I've heard how horribly complex compiled languages are; object-oriented because I only know VB.NET and am most comfortable with OOP; and my goal is to create a simple language which is easily learned by non-programmers.

I've been looking around but struggling to find helpful resources that explain about creating programming languages in any good detail. I'd really appreciate any online resources you can suggest - they have to be free - if there are similar StackOverflow questions that I missed, in-depth online articles or tutorials, extracts from free online textbooks... anything you think might be useful.

like image 681
Lou Avatar asked Feb 15 '23 11:02

Lou


2 Answers

Look no further than SICP - this book will enlighten you about the principles of programming and programming languages, and in its last two chapters it'll teach you how to build an interpreter and a compiler for the Scheme programming language - written in Scheme.

I can assure you, the material in the book will profoundly change the way you think about computation. Coupled with the DrRacket IDE, you'll have a great environment to learn how to create your own programming language starting from first principles.

Another recommended book would be Essentials of Programming Languages, although the material covered there is a bit more advanced. It'll also show you how to implement feature-rich languages in Scheme, this time including typed languages and an OOP language.

like image 59
Óscar López Avatar answered Mar 16 '23 07:03

Óscar López


Aho-Ulman have an excellent (and very deep) book on compilers. http://www.amazon.com/Compilers-Principles-Techniques-Alfred-Aho/dp/0201100886

However, if you want a quick recipe for writing a simple compiler, it might be too deep. Still, it may be good to have it for reference.

like image 37
Ivan Krivyakov Avatar answered Mar 16 '23 09:03

Ivan Krivyakov