Compiled script container. More...
#include <script.h>
Data Structures | |
class | checks |
A container class for compile-time check methods. More... | |
class | error |
A class to collect compile-time errors. More... | |
class | event |
An event block for a script. More... | |
class | header |
Header describes a script section. More... | |
class | interp |
An instance of the runtime interpreter. More... | |
struct | keyword |
A structure to introduce new core commands to the runtime engine. More... | |
struct | line |
Basic compiled statement. More... | |
class | methods |
Runtime methods collection class. More... | |
struct | stack_t |
Runtime stack for each interpreter instance. More... | |
class | strict |
Contains defined variables found by scope when strict is used. More... | |
class | symbol |
Contains instance of a runtime symbol. More... | |
Public Types | |
typedef char *(* | check_t )(script *img, script::header *scr, script::line_t *line) |
A type for compile-time command verification method invokation. | |
typedef event | event_t |
Convenience typedef to allow use of event name. | |
typedef struct ucc::script::keyword | keyword_t |
A structure to introduce new core commands to the runtime engine. | |
typedef struct ucc::script::line | line_t |
Basic compiled statement. | |
typedef bool(script::interp::* | method_t )(void) |
A type for runtime script method invokation. | |
Public Member Functions | |
unsigned | getErrors (void) |
char * | getFilename (void) |
unsigned | getLines (void) |
LinkedObject * | getListing (void) |
bool | isStrict (void) |
method_t | looping (void) |
method_t | pull (void) |
bool | push (line_t *line) |
Static Public Member Functions | |
static script * | append (script *merge, char *filename, script *config=((void *) 0)) |
Append a file into an existing image. | |
static void | assign (keyword_t *list) |
Assign new keywords from extensions and derived service. | |
static script * | compile (char *filename, script *config=((void *) 0)) |
Compile a script file into an image. | |
static void | copy (char *list, char *item, unsigned size) |
static unsigned | count (char *list) |
static header * | find (script *img, char *id) |
static keyword_t * | find (char *id) |
Find a keyword from internal command table. | |
static char * | get (char *list, unsigned offset) |
static char * | get (char *list, unsigned offset) |
static void | init (void) |
Initialize entire script engine. | |
static bool | isEvent (header *scr, char *id) |
static script * | merge (char *filename, script *root=((void *) 0)) |
Compile and merge a script into an existing shared image. | |
static unsigned | offset (char *list, unsigned index) |
Data Fields | |
header * | first |
LinkedObject ** | scripts |
Static Public Attributes | |
static unsigned | decimals |
default decimal places | |
static unsigned | indexing |
default symbol indexing | |
static size_t | paging |
default heap paging | |
static unsigned | sizing |
default symbol size | |
static unsigned | stacking |
stack frames in script runtime | |
static unsigned | stepping |
default stepping increment | |
Friends | |
class | checks |
class | error |
class | interp |
class | methods |
class | strict |
Compiled script container.
This class holds the image of a reference counted instance of a compiled script.
Definition at line 50 of file script.h.
typedef struct ucc::script::keyword ucc::script::keyword_t |
A structure to introduce new core commands to the runtime engine.
This is typically passed to assign as an array. Entries with no runtime method (method = NULL) are only processed at compile-time.
typedef struct ucc::script::line ucc::script::line_t |
Basic compiled statement.
This is a linked list of statement lines, with an array of parsed statement arguments. An optional dsp resource mask value can be assigned by a check method on a per-line basis as well as at closure time for a script.
static script* ucc::script::append | ( | script * | merge, | |
char * | filename, | |||
script * | config = ((void *) 0) | |||
) | [static] |
Append a file into an existing image.
A shared config script can be used that holds common definitions. Multiple script files can also be merged together into a final image.
merge | with prior compiled script. | |
filename | to compile. | |
config | image of script with common definitions. |
static void ucc::script::assign | ( | keyword_t * | list | ) | [static] |
Assign new keywords from extensions and derived service.
Must be called before any use.
list | of keywords to add to engine. |
Compile a script file into an image.
Creates the new image that will be used. A shared config script can be compiled and used to hold common definitions.
filename | to compile. | |
config | image of script with common definitions. |
static keyword_t* ucc::script::find | ( | char * | id | ) | [static] |
Find a keyword from internal command table.
This includes the core runtime engine keywords set through init() and any derived ones added through assign.
id | of command to find. |
static void ucc::script::init | ( | void | ) | [static] |
Initialize entire script engine.
Must be called first and once.
Compile and merge a script into an existing shared image.
This is related to compile, but the target script's definitions are linked into the base config script. Use NULL if no base. This is often used to compose lint images.
filename | to merge. | |
root | script to merge definitions with. |