Compiled script container.
More...
#include <ccscript.h>
|
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 |
| NAMESPACE_UCOMMON 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...
|
|
|
static Script * | compile (Script *merge, const char *filename, Script *config=NULL) |
| Compiled a file into an existing image. More...
|
|
static void | assign (keyword_t *list) |
| Assign new keywords from extensions and derived service. More...
|
|
static keyword_t * | find (const char *id) |
| Find a keyword from internal command table. More...
|
|
static void | init (void) |
| Initialize entire script engine. More...
|
|
static unsigned | offset (const char *list, unsigned index) |
|
static void | copy (const char *list, char *item, unsigned size) |
|
static unsigned | count (const char *list) |
|
static const char * | get (const char *list, unsigned offset) |
|
static char * | get (char *list, unsigned offset) |
|
static header * | find (Script *img, const char *id) |
|
static bool | isEvent (header *scr, const char *id) |
|
Compiled script container.
This class holds the image of a reference counted instance of a compiled script.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 31 of file ccscript.h.
A type for compile-time command verification method invokation.
Definition at line 64 of file ccscript.h.
Convenience typedef to allow use of event name.
Definition at line 140 of file ccscript.h.
NAMESPACE_UCOMMON 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.
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.
typedef bool(Script::interp::* ucommon::Script::method_t)(void) |
A type for runtime script method invokation.
Definition at line 41 of file ccscript.h.
ucommon::Script::~Script |
( |
| ) |
|
Assign new keywords from extensions and derived service.
Must be called before any use.
- Parameters
-
list | of keywords to add to engine. |
Definition at line 336 of file script.cpp.
Script * ucommon::Script::compile |
( |
Script * |
merge, |
|
|
const char * |
filename, |
|
|
Script * |
config = NULL |
|
) |
| |
|
static |
Compiled 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.
- Parameters
-
merge | with prior compiled script. |
filename | to compile. |
config | image of script with common definitions. |
- Returns
- compiled script object if successful.
Definition at line 427 of file script.cpp.
void ucommon::Script::copy |
( |
const char * |
list, |
|
|
char * |
item, |
|
|
unsigned |
size |
|
) |
| |
|
static |
unsigned ucommon::Script::count |
( |
const char * |
list | ) |
|
|
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.
- Parameters
-
- Returns
- keyword object for the command or NULL.
Definition at line 345 of file script.cpp.
const char * ucommon::Script::get |
( |
const char * |
list, |
|
|
unsigned |
offset |
|
) |
| |
|
static |
char * ucommon::Script::get |
( |
char * |
list, |
|
|
unsigned |
offset |
|
) |
| |
|
static |
unsigned ucommon::Script::getErrors |
( |
void |
| ) |
|
|
inline |
const char* ucommon::Script::getFilename |
( |
void |
| ) |
|
|
inline |
unsigned ucommon::Script::getLines |
( |
void |
| ) |
|
|
inline |
void ucommon::Script::init |
( |
void |
| ) |
|
|
static |
Initialize entire script engine.
Must be called first and once.
Definition at line 357 of file script.cpp.
bool ucommon::Script::isEvent |
( |
header * |
scr, |
|
|
const char * |
id |
|
) |
| |
|
static |
bool ucommon::Script::isStrict |
( |
void |
| ) |
|
|
inline |
unsigned ucommon::Script::offset |
( |
const char * |
list, |
|
|
unsigned |
index |
|
) |
| |
|
static |
bool ucommon::Script::push |
( |
line_t * |
line | ) |
|
unsigned ucommon::Script::decimals = 2 |
|
static |
default decimal places
Definition at line 454 of file ccscript.h.
header* ucommon::Script::first |
unsigned ucommon::Script::indexing = 77 |
|
static |
default symbol indexing
Definition at line 450 of file ccscript.h.
size_t ucommon::Script::paging = 0 |
|
static |
unsigned ucommon::Script::sizing = 64 |
|
static |
unsigned ucommon::Script::stacking = 20 |
|
static |
stack frames in script runtime
Definition at line 453 of file ccscript.h.
unsigned ucommon::Script::stepping = 7 |
|
static |
default stepping increment
Definition at line 449 of file ccscript.h.
The documentation for this class was generated from the following files: