Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
ScriptCommand Class Reference This class holds the bound keyword set for a given Bayonne style script interpreter. Bayonne script keyword binding tables and compiler constants.
More...
#include <script.h >
Inheritance diagram for ScriptCommand:
List of all members.
Protected Methods
virtual unsigned getTrapId (const char *trap)
Get the trap id number associated with a trap name. More...
virtual unsigned long getTrapDefault (void)
Get the mask bits for the default script. More...
virtual unsigned long getTrapHandler (scriptname_t *scr)
Get the mask bits for a trap "handler". More...
virtual unsigned long getTrapMask (unsigned id)
Get a trap mask for a given identifer. More...
virtual unsigned long getTrapModifier (const char *trapname)
A helper method for the compiler. More...
virtual unsigned long getTrapMask (const char *trapname)
A helper method for the compiler used specifically for "^" trap subsection requests. More...
char* chkIgnore (scriptline_t *line, ScriptImage *img)
Default compiler syntax to accept any syntax.
char* chkHasModify (scriptline_t *line, ScriptImage *img)
A check used by "inc" and "dec". More...
char* chkHasVars (scriptline_t *line, ScriptImage *img)
Script compiler syntax check for certain variable using statements such as "clear". More...
char* chkHasList (scriptline_t *line, ScriptImage *img)
Script compiler syntax check for assignment statements such as "set", "for", etc. More...
char* chkNoArgs (scriptline_t *line, ScriptImage *img)
Script compiler syntax check for commands that require no arguments to be present. More...
char* chkHasArgs (scriptline_t *line, ScriptImage *img)
Script compiler syntax check for commands that require one or more arguments to be present. More...
void Load (SCRKEYWORDS *keywords)
Load a set of keywords into the system keyword table. More...
int Trap (const char *name)
Add a trap handler symbolic identity to the keyword table. More...
int getCount (void)
Get count of active traps. More...
virtual char* Check (scriptcheck_t check, scriptline_t *line, ScriptImage *img)
Perform compile time check of a specified symbol. More...
ScriptCommand (const char *cfgfile)
Load a keydata entry for compile-time constants and bind the default ScriptInterp base class methods. More...
Friends
class ScriptImage
class ScriptInterp
Detailed Description
This class holds the bound keyword set for a given Bayonne style script interpreter. Bayonne script keyword binding tables and compiler constants.
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).
Author(s):
David Sugar <dyfet@ostel.com >
Constructor & Destructor Documentation
ScriptCommand::ScriptCommand (
const char * cfgfile ) [protected]
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.
Member Function Documentation
Perform compile time check of a specified symbol.
Returns:
syntax error message string.
Parameters:
void ScriptCommand::Load (
SCRKEYWORDS * keywords ) [protected]
Load a set of keywords into the system keyword table.
This provides a convenient method of initializing and adding to the keyword indexes.
Parameters:
int ScriptCommand::Trap (
const char * name ) [protected]
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:
Returns:
assigned id number for the trap.
Script compiler syntax check for commands that require one or more arguments to be present.
Returns:
syntax error message string or NULL.
Parameters:
Script compiler syntax check for assignment statements such as "set", "for", etc.
Returns:
syntax error message string or NULL.
Parameters:
A check used by "inc" and "dec".
Returns:
synxtax error message string or NULL.
Parameters:
Script compiler syntax check for certain variable using statements such as "clear".
Assumes list of valid variable arguments.
Default compiler syntax to accept any syntax.
Script compiler syntax check for commands that require no arguments to be present.
Returns:
syntax error message string or NULL.
Parameters:
int ScriptCommand::getCount (
void ) [inline, protected]
Get count of active traps.
Returns:
count of active trap identifiers.
unsigned long ScriptCommand::getTrapDefault (
void ) [inline, protected, virtual]
Get the mask bits for the default script.
Returns:
trap mask to use.
unsigned long ScriptCommand::getTrapHandler (
scriptname_t * scr ) [inline, protected, virtual]
Get the mask bits for a trap "handler".
Returns:
trap mask to use.
unsigned ScriptCommand::getTrapId (
const char * trap ) [protected, virtual]
Get the trap id number associated with a trap name.
Returns:
trap id number, 0 (exit) if invalid.
Parameters:
unsigned long ScriptCommand::getTrapMask (
const char * trapname ) [protected, virtual]
A helper method for the compiler used specifically for "^" trap subsection requests.
These will occasionally carry different attribute settings.
Parameters:
Returns:
bit shifted mask or 0 if invalid.
unsigned long ScriptCommand::getTrapMask (
unsigned id ) [protected, virtual]
Get a trap mask for a given identifer.
This is a virtual since some derived handlers may manipulate mask bits.
Returns:
signal mask.
Parameters:
unsigned long ScriptCommand::getTrapModifier (
const char * trapname ) [inline, protected, virtual]
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:
Returns:
bit shifted mask or 0 if invalid.
Friends And Related Function Documentation
class ScriptImage [friend]
class ScriptInterp [friend]
The documentation for this class was generated from the following file:
Generated at Thu Apr 5 14:11:40 2001 for ccscript by
1.2.1 written by Dimitri van Heesch ,
© 1997-2000