|
|
This class holds the bound keyword set for a given Bayonne style script interpreter. Application specific dialects are created by deriving a application specific version of ScriptCommand which then binds application specific keywords and associated methods in an application derived ScriptInterp which are typecast to (scriptmethod_t).
unsigned getTrapId (const char *trap) |
Get the trap id number associated with a trap name.
Parameters:
name | of trap identifier. |
Returns: trap id number, 0 (exit) if invalid.
unsigned long getTrapDefault (void) |
Get the mask bits for the default script.
Returns: trap mask to use.
unsigned long getTrapHandler (scriptname_t *scr) |
Get the mask bits for a trap "handler".
Returns: trap mask to use.
unsigned long getTrapMask (unsigned id) |
Get a trap mask for a given identifer. This is a virtual since some derived handlers may manipulate mask bits.
Parameters:
identifier | . |
Returns: signal mask.
unsigned long getTrapModifier (const char *trapname) |
A helper method for the compiler. Converts a named trap into it's bit shifted mask. By making it a virtual, derived dialects can add "aliases" to default trap names.
Parameters:
name | of trap identifier. |
Returns: bit shifted mask or 0 if invalid.
unsigned long getTrapMask (const char *trapname) |
A helper method for the compiler used specifically for "^" trap subsection requests. These will occasionally carry different attribute settings.
Parameters:
name | of trap identifier. |
Returns: bit shifted mask or 0 if invalid.
char * chkIgnore (scriptline_t *line) |
Default compiler syntax to accept any syntax.
char * chkHasModify (scriptline_t *line) |
A check used by "inc" and "dec".
Parameters:
line | statement. |
Returns: synxtax error message string or NULL.
char * chkHasVars (scriptline_t *line) |
Script compiler syntax check for certain variable using statements such as "clear". Assumes list of valid variable arguments.
char * chkHasList (scriptline_t *line) |
Script compiler syntax check for assignment statements such as "set", "for", etc.
Parameters:
line | statement. |
Returns: syntax error message string or NULL.
char * chkNoArgs (scriptline_t *line) |
Script compiler syntax check for commands that require no arguments to be present.
Parameters:
line | statement. |
Returns: syntax error message string or NULL.
char * chkHasArgs (scriptline_t *line) |
Script compiler syntax check for commands that require one or more arguments to be present.
Parameters:
line | statement. |
Returns: syntax error message string or NULL.
void Load (SCRKEYWORDS *keywords) |
Load a set of keywords into the system keyword table. This provides a convenient method of initializing and adding to the keyword indexes.
Parameters:
keyword | entries to load. |
Reimplemented from Keydata
int Trap (const char *name) |
Add a trap handler symbolic identity to the keyword table. These are used to handle signal mask coercion and event branch points in the compiler.
Parameters:
requested | trap name. |
Returns: assigned id number for the trap.
inline int getCount (void) |
Get count of active traps.
Returns: count of active trap identifiers.
Reimplemented from Keydata
char * Check (scriptcheck_t check, scriptline_t *line) |
Perform compile time check of a specified symbol.
Parameters:
line | pointer. |
Returns: syntax error message string.
ScriptCommand (const char *cfgfile) |
Load a keydata entry for compile-time constants and bind the default ScriptInterp base class methods. This class is never used alone, so no public constructor is provided.
Parameters:
keydata | entry for constants. |