Jump to content
  • Advertisement
Sign in to follow this  

basic scripting language for learning purposes

This topic is 5062 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I wrote this little scripting language for learning purposes (not mine; to show to someone how some things can be done). The language is very basic, but it is enough for someone to get started. The code looks like:

PRINT "(1 + 2) * 3 / 2 = " EVAL ((1 + 2) * 3 / 2) NEWLINE;
PRINT "A + B = " EVAL (A) " + " EVAL (B) " = " EVAL (A + B) NEWLINE;

C = 5;
PRINT "C + 3 + A * B = " EVAL (C + 3 + A * B) NEWLINE;
The package contains a compiler, a virtual machine and source code. The source code is placed in public domain so you can do whatever you want with it. Since the whole thing has been written in around two hours, expect bugs to exist. Nonetheless, i think that it's a nice thing to read if you want to roll your own language. I also think that i wrote the source code in a clean way, so if anyone knows C, he won't have problems understanding -and why not extending?- the code. Get it from here: http://www.slashstone.com/prod.php?id=4 This is mostly for learning purposes. If you want a better, more advanced language, check out NerveBreak: http://nervebreak.sourceforge.net/

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!