[C] A simple interpreted language
Someone asked me the other-day about writing a simple scripting language, so I got around to playing around a bit, and ended up writing a simple interpreter. In appearance I guess it looks something like a cross between assembly (source, destination) and BASIC:


It supports a simple form of loops, variable storage and retrieval, basic (limited functionality at this point) conditional statements, variable output.
Download:
-source code here.
-Project Files here (contains script file)
-sample script file

Excuse me sir this seems hawt :O
I’ll learn Rhys++ now
Mor said this on January 3, 2009 at 10:55 am
nice but try to use a second shorter as the first string.
e.g. your first string is rofl and the second is lol you will get loll the old variable value never gets deleted and it just overwrites some parts of it
~~ said this on November 20, 2009 at 3:54 pm
Hey,
Thanks for pointing that out, constructive criticism is always welcome.I’ll get around to sorting it out sometime when I’ve got time.
Rhys M. said this on November 21, 2009 at 12:08 pm
The way you’ve designed this code is very much amazing to me – it was enjoyable to look through rather than full of things for the sake of them.
I will certainly take apart this and learn how it is done, learning how a language can be parsed (apart from my work with BISON/Yacc) would be a fun task!
Thank you for providing the source and sample scripts.
Alexander said this on May 2, 2011 at 7:43 am
Alexander,
Glad you enjoyed my code!
Rhys M. said this on May 3, 2011 at 10:33 am