- All Known Implementing Classes:
Interpreter
The representation of
context, an execution context.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextActionContext action of thebeginoperator.static final ContextActionContext action of thecleardictstackoperator.static final ContextActionContext action of theclearstackoperator.static final ContextActionContext action of thecleartomarkoperator.static final ContextActionContext action of thecopyoperator.static final ContextActionContext action of thecountdictstackoperator.static final ContextActionContext action of thecountexecstackoperator.static final ContextActionContext action of thecountstackoperator.static final ContextActionContext action of thecounttomarkoperator.static final ContextActionContext action of thecurrentcontextoperator.static final ContextActionContext action of thecurrentdictoperator.static final ContextActionContext action of thedefoperator.static final ContextActionContext action of thedictstackoperator.static final ContextActionContext action of thedupoperator.static final ContextActionContext action of theeditlineoperator.static final ContextActionContext action of theendoperator.static final ContextActionContext action of theexchoperator.static final ContextActionContext action of theexecoperator.static final ContextActionContext action of theexecstackoperator.static final ContextActionContext action of theexecutiveoperator.static final ContextActionContext action of theexitoperator.static final ContextActionContext action of theforoperator.static final ContextActionContext action of theforkoperator.static final ContextActionContext action of thehaltoperator.static final ContextActionContext action of theifoperator.static final ContextActionContext action of theifelseoperator.static final ContextActionContext action of theindexoperator.static final ContextActionContext action of thejoinoperator.static final ContextActionContext action of theloadoperator.static final ContextActionContext action of theloopoperator.static final ContextActionContext action of thenamespaceoperator.static final ContextActionContext action of thepopoperator.static final ContextActionContext action of theprettyprintoperator.static final ContextActionContext action of theprintoperator.static final ContextActionContext action of thequitoperator.static final ContextActionContext action of therepeatoperator.static final ContextActionContext action of therequireoperator.static final ContextActionContext action of therolloperator.static final ContextActionContext action of thesayoperator.static final ContextActionContext action of thesleepoperator.static final ContextActionContext action of thestackoperator.static final ContextActionContext action of thestopoperator.static final ContextActionContext action of thestoppedoperator.static final ContextActionContext action of thestoreoperator.static final ContextActionContext action of thetokensoperator.static final ContextActionContext action of thewarnoperator.static final ContextActionContext action of thewhereoperator.static final ContextActionContext action of theyieldoperator.Fields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPE -
Method Summary
Modifier and TypeMethodDescriptionReturns the current dictionary (the topmost on the dictionary stack).Returns the dictionary stack.intReturns the size of the execution stack.Returns the execution stack.voidfork()longgetId()booleanReturns the value of the stopped flag.voidhandleExecutionStack(int level) voidInterprets the Psylla code from thereaderobject.voidinterpretBraced(PsyReader oReader) voidjoin()Returns the namespace pool.Returns the operand stack.operandStackBacked(int count) default PsyContextReturns the currently executing context.<T extends PsyObject>
TpsyLoad(PsyTextual oKey) voiddefault Optional<PsyFormalDict<PsyObject>> psyWhere(PsyTextual oKey) voidquit()voidrepl()voidsetStopped(boolean stopFlag) Sets the stopped flag to the specified value.voidvoidstop()Returns the system dictionary.default StringReturns the syntactic representation of this object.userDict()Returns the user dictionary.Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, psyType, typeName
-
Field Details
-
PSY_BEGIN
Context action of thebeginoperator. -
PSY_CLEARDICTSTACK
Context action of thecleardictstackoperator. -
PSY_CLEARSTACK
Context action of theclearstackoperator. -
PSY_CLEARTOMARK
Context action of thecleartomarkoperator. -
PSY_COPY
Context action of thecopyoperator. -
PSY_COUNTDICTSTACK
Context action of thecountdictstackoperator. -
PSY_COUNTEXECSTACK
Context action of thecountexecstackoperator. -
PSY_COUNTSTACK
Context action of thecountstackoperator. -
PSY_COUNTTOMARK
Context action of thecounttomarkoperator. -
PSY_CURRENTCONTEXT
Context action of thecurrentcontextoperator. -
PSY_CURRENTDICT
Context action of thecurrentdictoperator. -
PSY_DEF
Context action of thedefoperator. -
PSY_DICTSTACK
Context action of thedictstackoperator. -
PSY_DUP
Context action of thedupoperator. -
PSY_EDITLINE
Context action of theeditlineoperator. -
PSY_END
Context action of theendoperator. -
PSY_EXCH
Context action of theexchoperator. -
PSY_EXEC
Context action of theexecoperator. -
PSY_EXECSTACK
Context action of theexecstackoperator. -
PSY_EXECUTIVE
Context action of theexecutiveoperator. -
PSY_EXIT
Context action of theexitoperator. -
PSY_FOR
Context action of theforoperator. -
PSY_FORK
Context action of theforkoperator. -
PSY_HALT
Context action of thehaltoperator. -
PSY_IF
Context action of theifoperator. -
PSY_IFELSE
Context action of theifelseoperator. -
PSY_INDEX
Context action of theindexoperator. -
PSY_JOIN
Context action of thejoinoperator. -
PSY_LOAD
Context action of theloadoperator. -
PSY_LOOP
Context action of theloopoperator. -
PSY_NAMESPACE
Context action of thenamespaceoperator. -
PSY_POP
Context action of thepopoperator. -
PSY_PRETTYPRINT
Context action of theprettyprintoperator. -
PSY_PRINT
Context action of theprintoperator. -
PSY_QUIT
Context action of thequitoperator. -
PSY_REPEAT
Context action of therepeatoperator. -
PSY_REQUIRE
Context action of therequireoperator. -
PSY_ROLL
Context action of therolloperator. -
PSY_SAY
Context action of thesayoperator. -
PSY_SLEEP
Context action of thesleepoperator. -
PSY_STACK
Context action of thestackoperator. -
PSY_STOP
Context action of thestopoperator. -
PSY_STOPPED
Context action of thestoppedoperator. -
PSY_STORE
Context action of thestoreoperator. -
PSY_TOKENS
Context action of thetokensoperator. -
PSY_WARN
Context action of thewarnoperator. -
PSY_WHERE
Context action of thewhereoperator. -
PSY_YIELD
Context action of theyieldoperator.
-
-
Method Details
-
showStacks
-
getId
long getId() -
join
- Throws:
InterruptedException
-
toSyntaxString
Description copied from interface:PsyObjectReturns the syntactic representation of this object.- Specified by:
toSyntaxStringin interfacePsyObject- Returns:
- the syntactic representation of this object
-
psyCurrentContext
Returns the currently executing context.- Returns:
- the currently executing context
-
fork
-
quit
void quit() -
stop
void stop() -
operandStack
OperandStack operandStack()Returns the operand stack.- Returns:
- the operand stack
-
dictStack
DictStack dictStack()Returns the dictionary stack.- Returns:
- the dictionary stack
-
executionStack
ExecutionStack executionStack()Returns the execution stack.- Returns:
- the execution stack
-
systemDict
PsyFormalDict<PsyObject> systemDict()Returns the system dictionary.- Returns:
- the system dictionary
-
userDict
PsyFormalDict<PsyObject> userDict()Returns the user dictionary.- Returns:
- the user dictionary
-
currentDict
PsyFormalDict<PsyObject> currentDict()Returns the current dictionary (the topmost on the dictionary stack).- Returns:
- the current dictionary (the topmost on the dictionary stack)
-
namespacePool
NamespacePool namespacePool()Returns the namespace pool.- Returns:
- the namespace pool
-
execLevel
int execLevel()Returns the size of the execution stack.- Returns:
- the size of the execution stack
-
repl
- Throws:
PsyErrorException
-
getStopped
boolean getStopped()Returns the value of the stopped flag.- Returns:
- the value of the stopped flag
-
setStopped
void setStopped(boolean stopFlag) Sets the stopped flag to the specified value.- Parameters:
stopFlag- the value of the stopped flag.
-
handleExecutionStack
void handleExecutionStack(int level) -
interpret
Interprets the Psylla code from thereaderobject.- Parameters:
oReader- thereaderobject.
-
interpretBraced
- Throws:
PsyErrorException
-
operandStackBacked
- Throws:
PsyStackUnderflowException
-
psyWhere
-
psyLoad
- Throws:
PsyUndefinedException
-
psyRequire
- Throws:
PsyErrorException
-