-
Ok, this isn't about a new scripting language that can compile, such as Perl or Lua... This has to do with the ROM scripting. And it's not really about compiling persay, but more of a preparse of a script.
What I mean by preparse is that instead of parsing each line to find out what command it will do.. Scan the script once, converting every line into an entry in a script array that contains at least two parts: an opcode and the string of the line. I say at least two because certain things could be preparsed even further, such as ifchecks to identify the ifcheck number. Create a list of all possible actions that a script can take per line, including the catch-all "Command" for non-script actions. Preparsing the script would look at that list to convert as much as possible of the line, such as "mob echoat $n {RTHAT HURT!{x" could parse all the way to "mob echoat" for the command, replacing that with an opcode X and leaving "$n {RTHAT HURT!{x" for later EXECUTION.
Then, all the good bits of the execution can be a simple array index calculation instead of SIFTING through a list of strings EVERY time for EVERY line.
Just a thought...