#include <bayonnescript.h>
Inheritance diagram for ScriptInterp:

Public Member Functions | |
| virtual const char * | getPrefixPath (void) |
| long | getIntValue (const char *text, unsigned prec, Property *property=NULL) |
| int | getExpression (long *list, int max, unsigned prec, Property *property=NULL) |
| void | setLocal (void) |
| Set a new local context. | |
| void | clrLocal (void) |
| Clear the current local context and use the global context. | |
| ScriptSymbol * | getSymbols (void) |
| Get local stack context symbol space. | |
| bool | setVariable (const char *id, unsigned size, const char *value=NULL) |
| Provides interface for setting local or global variable passed by reference to drivers and such. | |
| const char * | getVariable (const char *id) |
| Accesses local or global variable by direct name reference. | |
| ScriptCommand * | getCommand (void) |
| Fetch the active command interpreter subsystem. | |
| virtual void | cleardigits (bool all) |
| This is a virtual to handle processing of the digits received buffer for commands that pop values from input. | |
| virtual char | getdigit (void) |
| Fetch an available digit or event code from input buffer and clear it. | |
| bool | setData (const char *scrname) |
| Set data read pointer to a known data source script. | |
| char | getPackToken (void) |
| Get pack token. | |
| void | clrTransactions (void) |
| Clear transaction processing group. | |
| Symbol * | initVariable (unsigned size=0) |
| Fetch a variable (symbol) that will be used to store data. | |
| void | rewindTemp (void) |
| Rewind temporary buffer for prescan results. | |
| void | setTemp (const char *value) |
| Set prescan value into temporary buffer. | |
| void | advance (void) |
| Advance program to the next script statement. | |
| void | error (const char *error) |
| Set error variable and advance to either the error handler or next script statement. | |
| Symbol * | getLocal (const char *name, unsigned size=0) |
| Search for symbols either thru the virtual global space or thru local space if a local space has been allocated on the heap. | |
| bool | attach (const char *scrname) |
| Attempt to attach script engine to active session and specify a starting script. | |
| void | detach (void) |
| Detach the current script image. | |
| bool | redirect (const char *scrname) |
| Script redirection support. | |
| bool | step (void) |
| Execute the next pending script statement. | |
| bool | isActive (void) |
| Test if script interpreter is currently active. | |
| char * | getOption (const char *def=NULL) |
| Fetch next logical option but do not evaluate. | |
| char * | getKeyword (const char *keyword) |
| Fetch an embedded attribute keyword argument. | |
| unsigned | initKeywords (unsigned size) |
| Initialize symbols from the keyword list. | |
| char * | getValue (const char *def=NULL) |
| Fetch and evaluate next logical option. | |
| char * | getString (void) |
| Fetch and concatenate a temporary string expression until either a comma or closing parenthesis. | |
| char * | getTempBuffer (void) |
| Fetch a temp workspace buffer. | |
| void | missing (const char *sym) |
| Post missing variable message on warn. | |
| char * | getContent (char *sym) |
| Evaluate the content of an option retrieved with getOption. | |
| Line * | getScript (void) |
| Return the current script line object so it may be debugged. | |
| bool | hasEvents (void) |
| Return if the script has generic event handlers. | |
| const char * | getMember (void) |
| Return the member id of a script command. | |
| Name * | getObject (void) |
| Return the master script object for resource context. | |
| ScriptImage * | getImage (void) |
| Return the script image holding this application's context. | |
| void | warning (bool enable) |
| Enable warnings on parsing undefined symbols. | |
| unsigned | getDecimal (void) |
| Get decimal. | |
Static Public Member Functions | |
| static long | getRealValue (double val, unsigned prec) |
| static double | getDouble (long value, unsigned prec) |
| static long | getInteger (long value, unsigned prec) |
| static long | getTens (unsigned prec) |
| static void | addFunction (const char *name, unsigned count, Function i) |
| static void | addConditional (const char *name, Cond test) |
| static void | addAttribute (const char *name, Meta meta) |
Protected Member Functions | |
| bool | scrRestart (void) |
| bool | scrEnable (void) |
| bool | scrDisable (void) |
| bool | scrUse (void) |
| bool | scrLoadable (void) |
| bool | scrPack (void) |
| bool | scrUnpack (void) |
| bool | scrOn (void) |
| bool | scrSlog (void) |
| bool | scrBasename (void) |
| bool | scrDirname (void) |
| bool | scrFullpath (void) |
| bool | scrGather (void) |
| bool | scrDump (void) |
| bool | scrInc (void) |
| bool | scrDec (void) |
| bool | scrFifo (void) |
| bool | scrMin (void) |
| bool | scrMax (void) |
| bool | scrCounter (void) |
| bool | scrReset (void) |
| bool | scrRemove (void) |
| bool | scrPost (void) |
| bool | scrPostList (void) |
| bool | scrStack (void) |
| bool | scrCache (void) |
| bool | scrArray (void) |
| bool | scrIndex (void) |
| bool | scrSequence (void) |
| bool | scrDup (void) |
| bool | scrArm (void) |
| bool | scrDisarm (void) |
| bool | scrNumber (void) |
| bool | scrDecimal (void) |
| bool | scrLocal (void) |
| bool | scrSet (void) |
| bool | scrAlias (void) |
| bool | scrRef (void) |
| bool | scrConst (void) |
| bool | scrVar (void) |
| bool | scrSize (void) |
| bool | scrInit (void) |
| bool | scrClear (void) |
| bool | scrCall (void) |
| bool | scrHas (void) |
| bool | scrMissing (void) |
| bool | scrLabel (void) |
| bool | scrCase (void) |
| bool | scrEndcase (void) |
| bool | scrError (void) |
| bool | scrStruct (void) |
| bool | scrIfThen (void) |
| bool | scrThen (void) |
| bool | scrElse (void) |
| bool | scrEndif (void) |
| bool | scrBegin (void) |
| bool | scrEnd (void) |
| bool | scrFor (void) |
| bool | scrRead (void) |
| bool | scrMap (void) |
| bool | scrRepeat (void) |
| bool | scrForeach (void) |
| bool | scrFordata (void) |
| bool | scrFordatasource (void) |
| bool | scrForarray (void) |
| bool | scrTryeach (void) |
| bool | scrSwap (void) |
| bool | scrDo (void) |
| bool | scrLoop (void) |
| bool | scrBreak (void) |
| bool | scrContinue (void) |
| bool | scrReturn (void) |
| bool | scrPop (void) |
| bool | scrSelect (void) |
| bool | scrOnce (void) |
| bool | scrLock (void) |
| bool | scrTry (void) |
| bool | scrSkip (void) |
| bool | expConditional (void) |
| void | setCommand (ScriptCommand *sc) |
| ScriptInterp (ScriptCommand *cmd, unsigned symsize, size_t pgsize=1024, const char *name=NULL) | |
| Derive a new instance of the system script interpreter. | |
| ~ScriptInterp () | |
| bool | getOnce (void) |
| Fetch unique "once" flag and set. | |
| void | Notify (unsigned long mask) |
| Notify signal mask for "on" handlers. | |
| void | Notify (const char *str) |
| Notify signal by symbolic name. | |
| unsigned long | getMask (void) |
| Fetch the current interpreter mask bits directly. | |
| void | setLine (Line *line) |
| Set the line handler to a new statement. | |
| unsigned long | getScriptMask (const char *id) |
| Fetch the script mask identifer. | |
| bool | conditional (void) |
| Used to process "conditional" arguments such as for IF/DO/LOOP statements. | |
| bool | scrExit (void) |
| Some systems can derive alternative "exit" commands which can call this routine after performing other operations. | |
| bool | scrGoto (void) |
| This is often called to process branching requests. | |
| bool | scrRaise (void) |
| This is used to raise a named event branch. | |
| bool | intGoto (bool event=false) |
| This is a new internal goto handler. | |
| virtual void | evtGoto (void) |
| This is a virtual for posting goto events. | |
| bool | scrIf (void) |
| override if support. | |
| bool | ifGoto (void) |
| If version of goto. | |
| bool | scrData (void) |
| Method used to encode "data" lines. | |
| virtual unsigned | getId (void) |
| Used to return channel identifiers in some systems. | |
| virtual bool | getGlobalTrap (unsigned id) |
| Used to fetch a global trap execution context branch. | |
| void | trap (unsigned id) |
| Set the execution interpreter to a trap identifier. | |
| void | trap (const char *trapname) |
| Select trap by symbolic name and execute if found, else advance to next script step (unless exit trap). | |
| bool | push (void) |
| Attempt to push a value onto the stack. | |
| bool | pull (void) |
| Attempt to recall a previous stack level. | |
| void | clearStack (void) |
| Clear the stack of local loops or recursion for branching. | |
| unsigned long | getScriptMask (void) |
| Get script mask through subroutine levels. | |
| bool | signal (const char *trapname) |
| Signals are used during "delayed" execution steps when a signal event has occured aynchronously with the execution of a script controlled state event handler. | |
| virtual bool | event (const char *evtname, bool inheret=true) |
| Events reference to named handlers which have been attached to a script. | |
| bool | signal (unsigned trapid) |
| Signals can be referenced by numeric id as well as by symbolic name. | |
| virtual bool | execute (Method method) |
| Runtime execution of script handler. | |
| virtual void | stop (unsigned long mask) |
| Stop request handler. | |
| virtual void | exit (void)=0 |
| Exit request handler. | |
| Name * | getScriptImage (const char *label) |
| Runtime branch point for label selection. | |
| Name * | getScriptCopy (const char *src) |
| Fetch duplicative script image as needed. | |
| virtual void | sleepScheduler (timeout_t timeout) |
| Patch point for sleep delay notification. | |
| virtual void | stepScheduler (const char *trapname) |
| Step scheduler callback to force step execution. | |
| virtual void | setExclusive (bool enable) |
| Set exclusive sync locking for interpreter. | |
| void | initRuntime (Name *name) |
| Initialize execution environment for a script. | |
| virtual void | initialize (void) |
| New virtual to initialize script environment syms before running init sections. | |
Protected Attributes | |
| ScriptCommand * | cmd |
| ScriptImage * | image |
| Context | script [31+1] |
| char * | temps [16] |
| int | tempidx |
| unsigned | stack |
| unsigned | symsize |
| size_t | pgsize |
| unsigned long | signalmask |
| bool | once |
| bool | warn |
| bool | trace |
| bool | initialized |
| unsigned | steps |
| ScriptSymbol * | recmode |
| char | _idname [33] |
| unsigned char | lckcount |
| ScriptData * | datasource |
Friends | |
| class __EXPORT | ScriptImage |
| class __EXPORT | ScriptModule |
| class __EXPORT | ScriptData |
| class __EXPORT | ScriptCommand |
Classes | |
| class | Context |
This class is further derived to impliment application specific language dialects.
|
||||||||||||||||||||
|
Derive a new instance of the system script interpreter.
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||||||
|
|
|
|
Advance program to the next script statement.
|
|
|
Attempt to attach script engine to active session and specify a starting script.
Reimplemented in Trunk. |
|
|
This is a virtual to handle processing of the digits received buffer for commands that pop values from input.
Reimplemented in Trunk. |
|
|
Clear the stack of local loops or recursion for branching.
|
|
|
Clear the current local context and use the global context. If the current local context is only on our stack level, it is destroyed. |
|
|
Clear transaction processing group.
|
|
|
Used to process "conditional" arguments such as for IF/DO/LOOP statements. The index is kept at the next logical argument so a goto can be performed if needed.
|
|
|
Detach the current script image. If it is the last ref count and the exit flag is set, then delete it. Reimplemented in Trunk. |
|
|
Set error variable and advance to either the error handler or next script statement.
|
|
||||||||||||
|
Events reference to named handlers which have been attached to a script. This allows low level applications to invoke an event handler much the way a signal handler occurs.
Reimplemented in Trunk. |
|
|
This is a virtual for posting goto events.
|
|
|
Runtime execution of script handler. This can be called in the current or derived class to invoke extensible methods.
|
|
|
Exit request handler. This is called when no script line exists. No default behavior is known. |
|
|
|
|
|
Fetch the active command interpreter subsystem.
Reimplemented in Trunk. |
|
|
Evaluate the content of an option retrieved with getOption.
|
|
|
Get decimal.
|
|
|
Fetch an available digit or event code from input buffer and clear it.
Reimplemented in Trunk. |
|
||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
|
Used to fetch a global trap execution context branch.
|
|
|
Used to return channel identifiers in some systems.
Reimplemented in Trunk. |
|
|
Return the script image holding this application's context.
|
|
||||||||||||
|
|
|
||||||||||||||||
|
|
|
|
Fetch an embedded attribute keyword argument. This allows embedded tag=value keywords to be extracted.
|
|
||||||||||||
|
Search for symbols either thru the virtual global space or thru local space if a local space has been allocated on the heap.
|
|
|
Fetch the current interpreter mask bits directly.
|
|
|
Return the member id of a script command.
|
|
|
Return the master script object for resource context.
|
|
|
Fetch unique "once" flag and set.
Reimplemented in Trunk. |
|
|
Fetch next logical option but do not evaluate. The index is advanced.
|
|
|
Get pack token.
|
|
|
Reimplemented in Trunk. |
|
||||||||||||
|
|
|
|
Return the current script line object so it may be debugged.
|
|
|
Fetch duplicative script image as needed.
|
|
|
Runtime branch point for label selection.
|
|
|
Get script mask through subroutine levels.
|
|
|
Fetch the script mask identifer.
|
|
|
Fetch and concatenate a temporary string expression until either a comma or closing parenthesis.
|
|
|
Get local stack context symbol space.
|
|
|
Fetch a temp workspace buffer.
|
|
|
|
|
|
Fetch and evaluate next logical option. If a symbol ref. then the symbol is also expressed. The index is advanced.
|
|
|
Accesses local or global variable by direct name reference.
|
|
|
Return if the script has generic event handlers. ..
|
|
|
If version of goto.
|
|
|
New virtual to initialize script environment syms before running init sections.
Reimplemented in Trunk. |
|
|
Initialize symbols from the keyword list.
|
|
|
Initialize execution environment for a script.
|
|
|
Fetch a variable (symbol) that will be used to store data. This advances the index.
|
|
|
This is a new internal goto handler.
|
|
|
Test if script interpreter is currently active.
|
|
|
Post missing variable message on warn.
|
|
|
Notify signal by symbolic name.
|
|
|
Notify signal mask for "on" handlers.
|
|
|
Attempt to recall a previous stack level.
|
|
|
Attempt to push a value onto the stack.
|
|
|
Script redirection support.
|
|
|
Rewind temporary buffer for prescan results.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Method used to encode "data" lines.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Some systems can derive alternative "exit" commands which can call this routine after performing other operations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is often called to process branching requests.
|
|
|
|
|
|
override if support.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is used to raise a named event branch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set data read pointer to a known data source script.
|
|
|
Set exclusive sync locking for interpreter.
Reimplemented from ScriptSymbol. Reimplemented in Trunk. |
|
|
Set the line handler to a new statement.
|
|
|
Set a new local context. If the old context is only used on our stack level already, it is destroyed. |
|
|
Set prescan value into temporary buffer.
|
|
||||||||||||||||
|
Provides interface for setting local or global variable passed by reference to drivers and such.
|
|
|
Signals can be referenced by numeric id as well as by symbolic name.
|
|
|
Signals are used during "delayed" execution steps when a signal event has occured aynchronously with the execution of a script controlled state event handler. This mechanism can be used in place of calling implicit "Step" traps.
|
|
|
Patch point for sleep delay notification.
|
|
|
Execute the next pending script statement. If no statement is selected, then we execute the exit handler instead. We can also force feed a trap identifier.
|
|
|
Step scheduler callback to force step execution.
|
|
|
Stop request handler. Used for handling external trap requests during a "Signal". This is needed in some state engines when the current state is being abandoned because of a signaled trap.
|
|
|
Select trap by symbolic name and execute if found, else advance to next script step (unless exit trap).
|
|
|
Set the execution interpreter to a trap identifier. If no trap id exists, then advance to next script statement (unless exit trap).
|
|
|
Enable warnings on parsing undefined symbols.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from ScriptSymbol. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented in Trunk. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented from ScriptSymbol. |
|
|
|
|
|
|
|
|
|
|
|
|
1.4.4