#include <script.h>
Inheritance diagram for ScriptCommand:
Public Member Functions | |
Method | getHandler (const char *keyword) |
Get the method handler associated with a given keyword. | |
char * | check (char *command, Line *line, ScriptImage *img) |
Check keyword syntax. | |
virtual unsigned | getTrapId (const char *trap) |
Get the trap id number associated with a trap name. | |
virtual unsigned long | getTrapDefault (void) |
Get the mask bits for the default script. | |
virtual unsigned long | getTrapHandler (Name *scr) |
Get the mask bits for a trap "handler". | |
virtual unsigned long | getTrapMask (unsigned id) |
Get a trap mask for a given identifer. | |
virtual unsigned long | getTrapModifier (const char *trapname) |
A helper method for the compiler. | |
virtual unsigned long | getTrapMask (const char *trapname) |
A helper method for the compiler used specifically for "^" trap subsection requests. | |
char * | chkIgnore (Line *line, ScriptImage *img) |
Default compiler syntax to accept any syntax. | |
char * | chkModule (Line *line, ScriptImage *img) |
Module based script checker. | |
char * | chkUse (Line *line, ScriptImage *img) |
Performs DSO load phase for USE modules. | |
char * | chkHasModify (Line *line, ScriptImage *img) |
A check used by "inc" and "dec". | |
char * | chkHasVars (Line *line, ScriptImage *img) |
Script compiler syntax check for certain variable using statements such as "clear". | |
char * | chkHasList (Line *line, ScriptImage *img) |
Script compiler syntax check for assignment statements such as "set", "for", etc. | |
char * | chkNoArgs (Line *line, ScriptImage *img) |
Script compiler syntax check for commands that require no arguments to be present. | |
char * | chkHasArgs (Line *line, ScriptImage *img) |
Script compiler syntax check for commands that require one or more arguments to be present. | |
void | load (Script::Define *keywords) |
Load a set of keywords into the system keyword table. | |
int | trap (const char *name) |
Add a trap handler symbolic identity to the keyword table. | |
int | getCount (void) |
Get count of active traps. | |
virtual char * | check (Check chk, Line *line, ScriptImage *img) |
Perform compile time check of a specified symbol. | |
ScriptCommand () | |
Load a keydata entry for compile-time constants and bind the default ScriptInterp base class methods. | |
virtual int | mapicmp (const char *s1, const char *s2) |
virtual int | mapnicmp (const char *s1, const char *s2, size_t n) |
Friends | |
class | ScriptImage |
class | ScriptInterp |
class | ScriptModule |
Classes | |
struct | _keyword |
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).
ScriptCommand::ScriptCommand | ( | ) |
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.
keydata | entry for constants. |
Method ScriptCommand::getHandler | ( | const char * | keyword | ) |
Get the method handler associated with a given keyword.
This is used by ScriptImage when compiling.
keyword | to search for. |
char* ScriptCommand::check | ( | char * | command, | |
Line * | line, | |||
ScriptImage * | img | |||
) |
Check keyword syntax.
name | of keyword to check. | |
hook | to compiler source. |
virtual unsigned ScriptCommand::getTrapId | ( | const char * | trap | ) | [virtual] |
Get the trap id number associated with a trap name.
name | of trap identifier. |
virtual unsigned long ScriptCommand::getTrapDefault | ( | void | ) | [inline, virtual] |
Get the mask bits for the default script.
virtual unsigned long ScriptCommand::getTrapHandler | ( | Name * | scr | ) | [inline, virtual] |
Get the mask bits for a trap "handler".
virtual unsigned long ScriptCommand::getTrapMask | ( | unsigned | id | ) | [virtual] |
Get a trap mask for a given identifer.
This is a virtual since some derived handlers may manipulate mask bits.
identifier. |
virtual unsigned long ScriptCommand::getTrapModifier | ( | const char * | trapname | ) | [inline, 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.
name | of trap identifier. |
virtual unsigned long ScriptCommand::getTrapMask | ( | const char * | trapname | ) | [virtual] |
A helper method for the compiler used specifically for "^" trap subsection requests.
These will occasionally carry different attribute settings.
name | of trap identifier. |
char* ScriptCommand::chkIgnore | ( | Line * | line, | |
ScriptImage * | img | |||
) |
Default compiler syntax to accept any syntax.
char* ScriptCommand::chkModule | ( | Line * | line, | |
ScriptImage * | img | |||
) |
Module based script checker.
char* ScriptCommand::chkUse | ( | Line * | line, | |
ScriptImage * | img | |||
) |
Performs DSO load phase for USE modules.
char* ScriptCommand::chkHasModify | ( | Line * | line, | |
ScriptImage * | img | |||
) |
A check used by "inc" and "dec".
line | statement. |
char* ScriptCommand::chkHasVars | ( | Line * | line, | |
ScriptImage * | img | |||
) |
Script compiler syntax check for certain variable using statements such as "clear".
Assumes list of valid variable arguments.
char* ScriptCommand::chkHasList | ( | Line * | line, | |
ScriptImage * | img | |||
) |
Script compiler syntax check for assignment statements such as "set", "for", etc.
line | statement. |
char* ScriptCommand::chkNoArgs | ( | Line * | line, | |
ScriptImage * | img | |||
) |
Script compiler syntax check for commands that require no arguments to be present.
line | statement. |
char* ScriptCommand::chkHasArgs | ( | Line * | line, | |
ScriptImage * | img | |||
) |
Script compiler syntax check for commands that require one or more arguments to be present.
line | statement. |
void ScriptCommand::load | ( | Script::Define * | keywords | ) |
Load a set of keywords into the system keyword table.
This provides a convenient method of initializing and adding to the keyword indexes.
keyword | entries to load. |
int ScriptCommand::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.
requested | trap name. |
int ScriptCommand::getCount | ( | void | ) | [inline] |
Get count of active traps.
virtual char* ScriptCommand::check | ( | Check | chk, | |
Line * | line, | |||
ScriptImage * | img | |||
) | [inline, virtual] |
Perform compile time check of a specified symbol.
line | pointer. |
virtual int ScriptCommand::mapicmp | ( | const char * | s1, | |
const char * | s2 | |||
) | [inline, virtual] |
virtual int ScriptCommand::mapnicmp | ( | const char * | s1, | |
const char * | s2, | |||
size_t | n | |||
) | [inline, virtual] |
friend class ScriptImage [friend] |
friend class ScriptInterp [friend] |
friend class ScriptModule [friend] |