You mean,
this?
That system can be applied to cover all ZS commands, and given a more robust syntax. See also:
ZBasicYou enter commands for these in ZC Player, and can execute them as scripts, and even save them. I created them for the purpose of general quest debugging, and for personal amusement.
ZB needs an overhaul and completion. ZShell, just needs a bit of minor cleanup. I was forced to do things to circumvent 2.54 Parser bugs that I can now make cleaner.
Something like Lua though, in ZQ, is not on the table. You could make a header for simple actions if you want.
Perhaps one day we can turn the parser into its own module and link it into SciTE, so that SciTE can invoke it.
FWIW, I added a bunch of Pascal-like syntax to ZScript. I've considered adding begin and end tokens, too.
This is perfectly legal, IIRC:
if ( (not (a is_greater b) and b is_less c) or (a<>d) ) function();
I didn't see a good way to add the Pascal 'then' token, or rather, I didn't see a good way to replace the requirement for a left paren in a stmt, as I could easily add 'then' for the right paren.
(Pascal uses 'begin if', which would need to replace both if and the left paren.)
I could however, add begin and end as alts for
curly braces:
if ( (not (a is_greater b) and b is_less c) or (a<>d) )
begin
a := 16;
function(a);
end; //or end
Unfortunately there's no good way to allow 'procedure' style syntax in addition to that. It just provides the user with some choices for tokens.
C++ already offers alt tokens, so I decided to allow those, and I included a few from Pascal in the process. Likewise, Pascal-style case isn't an option.
Anyway, it's perfectly possible to make your own interpreters
on top of ZScript. Just don't expect them to be fast, and remember that you don't have vectors to use.