Sign in to follow this  
Zotoaster

Learning more about programming scripting languages?

Recommended Posts

Hey all. I've been working my butt off for like 2 years just trying to figure out making scripting languages, and I have made a lot of progress... the problem is that all my learning was done by looking for the odd tutorial here and there, asking some questions around the place, and mostly figuring out things for myself, so as you may have guessed, my own programming language doesn't quite compare to some around. My question is: is there anywhere that I can learn detailed information about making a programming language of my own, in one easy to read source? Perhaps a tutorial or a book or something? (PS, I've already done the Flip Code one). Thanks.

Share this post


Link to post
Share on other sites
The Dragon book is the classic text on compiler design, and covers virtually everything you'll need to know albeit not always in detail. I'd be surprised if you couldn't find a copy in your local technical library.

Also, I wouldn't go hunting specifically for tutorials on 'scripting languages.' The same techniques apply in either case, a scripting language being little more than a relatively simple type of compiler without much focus on optimization.

Share this post


Link to post
Share on other sites
The Dragon book can be pretty heavy reading; it goes into all the details of DFA's, NFA's and parsing algorithms. I would check other books first. One thing I found valuable was Jack Crenshaw's 'let's write a compiler' series. You might be beyond that level though.

This is an interesting blog post:

This guy writes a parser and interpreter for a simple language in Python

Share this post


Link to post
Share on other sites
There's a book called

Writing Compilers and Interpreters by Ronald Mak, which deals with this exact issue ( ie building scripting languages in c++ ).

Good Luck!

-ddn

[Edited by - ddn3 on October 27, 2008 3:08:50 PM]

Share this post


Link to post
Share on other sites
I have penned an article about operational semantics, to provide a formal description of a language before implementing it. I find that such descriptions make the subsequent implementation easier, because you know where you're going.

The second part of the article will hopefully be online tommorrow.

Share this post


Link to post
Share on other sites
There's a book on building your own scripting language for game programming called "Game Scripting Mastery"
(http://www.amazon.com/Scripting-Mastery-Premier-Press-Development/dp/1931841578/ref=sr_1_1?ie=UTF8&s=books&qid=1225134448&sr=8-1).

Not a bad book, really focused on the subject of building a virtual machine and scripting language to run on it.

Cheers,

Bob

Share this post


Link to post
Share on other sites
You guys rule! Thanks for all the awesome links. I will have to choose very carefully what I go with - though I hear Game Scripting Mastery is very highly recommended, heheh.

Three cheers to GD

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this