|
|
|
|
Runic Script
Runic Script is a scripting language currently in very early development. My goal is to create an interpreted (perhaps later byte-code compiled) object-oriented scripting language with C++ -like syntax and static typing, that allows import of of functions and classes from native C++ code. For the folks who are asking now why i don't use Lua, Python, etc. : i do this mainly for the learning effect, and just for the heck of it, because it's cool to have one's own scripting language ;) I intend to use it as a very powerful scene-description language for Tandorine, and why not give it the power to be useful for other things, like game-scripting too? Since C++ is still my favourite language i intend to make the syntax of RunicScript as C++ -like as possible. Well, at least this is what i hope to accomplish, you will be able to follow my progress here :) Some notes on the code: The project is in a very very early phase of development, so the code you can download below is not really useable. The only reason i'll be putting the current codebase up here regularly is to keep some kind of evolutionary history of the code, and to allow other people interested in the topic to see some code they might find some inspiration from :) And this code also serves as the proof for the people who looked at the horrible code from my old projects that i can write 'clean' code too, since now i give my best to stay away from 'hacks', use design patterns, STL containers, and i even document extensively, so that i can generate nice html docs with Doxygen :) Some technicalities: if you read the code you will see that i write my own parser...i know that this is not the standard, since everyone uses parser-generators like bison, but as i wrote earlier, i do this for learning purposes too, so i will not use a generator, and a good parser for C/C++ syntax, on which i will base my own, can not be generated anyway. RunicScript v0.010 The lexical analyzer (handwritten, no flex! :) ) is complete, interpreter just a very simple stackmachine. Currently parser and interpreter can handle and evaluate simple mathematical expressions like 2.0*(1/(1+(5*0.5)-0.5)) or 1+2*3*3-1/3-2 Download current source here(550k). Package also contains Doxygen-generated documentation |