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{}},
      }

        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{}},
        	"timestamp":       &timestampFunc{&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
            	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

                func (erp *ECALRuntimeProvider) NewRuntimeError(t error, d string, node *parser.ASTNode) error

                  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.

                    func (*ECALRuntimeProvider) Runtime

                    func (erp *ECALRuntimeProvider) Runtime(node *parser.ASTNode) parser.Runtime

                      Runtime returns a runtime component for a given ASTNode.