There are many reasons to have an alreaady
implemented scripting language rather than roll our own.
It helps to look at the script language via an
interactive command prompt rather than a *.rc file.
For driving debugging, testing, and other uses we
need to be able to arbitrarily load/unload user modules,
call routines in those modules, tweak settings
in the VM, change registers in the VM CPU, request
info from the VM, etc.
Once you look at it this way, it eliminates using
a simple script language and pre-processor.
If all we ever want to do involves limited changes,
then a simple script will do. But if we want real
power from plex86, then we need more.
You might have a complex debug script function, which
loads some modules, sets up the CPU and some memory,
and takes a few parameters. With a script language,
we could call this at any arbitrary time and because
of parameters not have to rewrite it 20 ways.
We also need variables. Need to be able to set a
variable, such that the behaviour of downstream script
code changes. With an increasing number of script
file options, it gets rediculous commenting/uncommenting
to get this functionality.
We will certainly need to be able to recursively read
other script files. I we are to be able to run script
code arbitrarily from a prompt, call functions etc,
then we really need a script language to take care of
all this; caching script code for later execution etc.
A powerful script language is an excellent way to create
various kinds of tests, like validation tests, for plex86.
It's also an excellent way for developers to pass test code
to each other.
I'm looking for a script language that will not only deal
with *.rc files, but take care of all these needs.
It would be ideal if the script language came as a library
rather than having to "embed" it in the code.
-Kevin