Documentation ¶
Overview ¶
Package interpreter contains the ECAL interpreter.
Package interpreter contains the ECAL interpreter.
Index ¶
Constants ¶
View Source
const ( Stop interrogationCmd = iota // Stop the execution (default) StepIn // Step into the next function StepOut // Step out of the current function StepOver // Step over the next function Resume // Resume execution - do not break again on the same line Kill // Resume execution - and kill the thread on the next state change )
Interrogation commands
Variables ¶
View Source
var DebugCommandsMap = map[string]util.DebugCommand{
"breakonstart": &breakOnStartCommand{&inbuildDebugCommand{}},
"break": &setBreakpointCommand{&inbuildDebugCommand{}},
"rmbreak": &rmBreakpointCommand{&inbuildDebugCommand{}},
"disablebreak": &disableBreakpointCommand{&inbuildDebugCommand{}},
"cont": &contCommand{&inbuildDebugCommand{}},
"describe": &describeCommand{&inbuildDebugCommand{}},
"status": &statusCommand{&inbuildDebugCommand{}},
"extract": &extractCommand{&inbuildDebugCommand{}},
"inject": &injectCommand{&inbuildDebugCommand{}},
"lockstate": &lockstateCommand{&inbuildDebugCommand{}},
}
DebugCommandsMap contains the mapping of inbuild debug commands.
View Source
var InbuildFuncMap = map[string]util.ECALFunction{
"range": &rangeFunc{&inbuildBaseFunc{}},
"new": &newFunc{&inbuildBaseFunc{}},
"type": &typeFunc{&inbuildBaseFunc{}},
"len": &lenFunc{&inbuildBaseFunc{}},
"del": &delFunc{&inbuildBaseFunc{}},
"add": &addFunc{&inbuildBaseFunc{}},
"concat": &concatFunc{&inbuildBaseFunc{}},
"now": &nowFunc{&inbuildBaseFunc{}},
"rand": &randFunc{&inbuildBaseFunc{}},
"timestamp": ×tampFunc{&inbuildBaseFunc{}},
"dumpenv": &dumpenvFunc{&inbuildBaseFunc{}},
"doc": &docFunc{&inbuildBaseFunc{}},
"sleep": &sleepFunc{&inbuildBaseFunc{}},
"raise": &raise{&inbuildBaseFunc{}},
"addEvent": &addevent{&inbuildBaseFunc{}},
"addEventAndWait": &addeventandwait{&addevent{&inbuildBaseFunc{}}},
"setCronTrigger": &setCronTrigger{&inbuildBaseFunc{}},
"setPulseTrigger": &setPulseTrigger{&inbuildBaseFunc{}},
}
InbuildFuncMap contains the mapping of inbuild functions.
Functions ¶
func NewECALDebugger ¶
func NewECALDebugger(globalVS parser.Scope) util.ECALDebugger
NewECALDebugger returns a new debugger object.
Types ¶
type ECALRuntimeProvider ¶
type ECALRuntimeProvider struct { Name string // Name to identify the input ImportLocator util.ECALImportLocator // Locator object for imports Logger util.Logger // Logger object for log messages Processor engine.Processor // Processor of the ECA engine Mutexes map[string]*sync.Mutex // Map of named mutexes MutexLog *datautil.RingBuffer // Ringbuffer to track locking events MutexeOwners map[string]uint64 // Map of mutex owners MutexesMutex *sync.Mutex // Mutex for mutexes map Cron *timeutil.Cron // Cron object for scheduled execution Debugger util.ECALDebugger // Optional: ECAL Debugger object }
ECALRuntimeProvider is the factory object producing runtime objects for ECAL ASTs.
func NewECALRuntimeProvider ¶
func NewECALRuntimeProvider(name string, importLocator util.ECALImportLocator, logger util.Logger) *ECALRuntimeProvider
NewECALRuntimeProvider returns a new instance of a ECAL runtime provider.
func (*ECALRuntimeProvider) NewRuntimeError ¶
NewRuntimeError creates a new RuntimeError object.
func (*ECALRuntimeProvider) NewThreadID ¶
func (erp *ECALRuntimeProvider) NewThreadID() uint64
NewThreadID creates a new thread ID unique to this runtime provider instance. This ID can be safely used for the thread ID when calling Eval on a parser.Runtime instance.
Click to show internal directories.
Click to hide internal directories.