PnScript -- an object for byte-compiling and executing scripts in Paranormal
PnScript objects parse and execute user scripts for Paranormal actuators. The script
requires a PnSymbolTable object into which the in-script variables will be placed.
The symbol table can then be used to retrieve or change the values of in-script variables,
as well as share variables between multiple scripts.
Creates a new PnScript object.
|Returns :|| The newly created PnScript object|
Parses a script, compiling it to a bytecode that is stored within the script object.
All in-script variables within the script are added to the specified symbol table (if
they are not already in it). If errors are encountered while parsing the script,
they are output using pn_error().
|script :|| A PnScript|
|symbol_table :|| the PnSymbolTable to associate with the script|
|string :|| a string containing the script|
|Returns :|| TRUE on success; FALSE otherwise|
void pn_script_execute (PnScript *script);
Executes a script, updating all variabes in the associated symbol
table as the script dictates.