When I'm creating a virtual machine based script language, I always get stuck at the same point: Object-based data allocation, and scope-based data referencing. Also, I'm sure my byte-code techniques could be improved in several ways, and additionally, I'm not sure I'm doing things properly, so I was thinking on getting a book about this. I don't want a book plenty of ASM code, or a book with language speciffic code. I would preffer a good book with pseudo-code examples, so I can get the techniques and the like, and apply it on BlitzMax, C or any other language.
Thanks!
http://www.amazon.com/Compilers-Principles-Techniques-Tools-2nd/dp/0321486811/ref=sr_1_2?ie=UTF8&s=books&qid=1224771212&sr=8-2If I'm not mistaken, that's the famous "dragon book". The bible when it comes to writing compilers and stuff.
Now, a scripting language does not need a compiler, but you did mention a virtual machine, so compiling the script in one way or the other might be handy, since comparing integers/bytes is faster than comparing strings.
Not sure if it contains a lot of asm or language specific parts, but I would think that it contains some, at least.
Pour over this source code for a few weeks:
http://remobjects.com/?ps
thanks deps and wmd.
I'm taking a look to this.
Any additional suggestions?
@wmd: This example is great, but this script language does not handle objects (and that's where I usually get stuck). I know this is a very speciffic request, but I think some users here may have walked this path before me!
Thanks