I'm still exploring that myself, actually
, it basically started as a Expression evaluator for use in my programs- but the way I had it structured, I was able to simply add statement separators for the ability to treat it as a script language.
Right now, it's not exactly a "secure" script language like VBScript, in that it can access the filesystem (through either the filesystemObject or my BCFile library) as well as the ability to call DLLs, a feature which was not easy to implement, let me tell you!
Basically, after I had the basics down, I wanted to make it easier to perform calculations- so I made an "SEQ" function, that created an array (or, in BCScript terms, a "List") of numbers. the CHR$() function, as implemented by the Evaluator, doesn't support arrays. However, the Evaluator notices this, and instead performs the function for each element, creating a new element for each one. (Actually, it does this for any function with a single argument that doesn't have certain flags set)
The same holds true for most operators- including the + operator. the evaluator, again, notices that it will not be able to simply tell VB to add the two together, so it essentially permutes both arrays, using that operator. For example:
{1,2,3}*{6,7,8}
gives me:
{{6,7,8},{12,14,16},{18,21,24}}
or, a three element array of three element arrays- a matrix, of sorts. Because I found I often wanted to work with these types of results as a single scalar array, I created the "flatten" function which- flattens the array into a one-dimensional array. In the previous output, running the flatten function would result in:
{6,7,8,12,14,16,18,21,24}
Originally, I was working with a evaluator I had found on the net, and trying to change it. It was full of hacks and kludges. I eventually lost the code, so I started from scratch, knowing exactly what I wanted- a plugin based architecture for both operators and functions. It worked- once I had the framework down, it became quite a fun endeavor to think of new operators and functions. I quickly added all sorts of operators from a number of programming languages, such as "in" from delphi and pascal, the spaceship operator from Perl, etc etc. And from there it was a simple step to add a statement separator. I already had a robust "variables" and "Functions" collections that were easily programmable from the host program.
the only downside keeping me from releasing it with too much enthusiasm is my lack of documentation.