- All Superinterfaces:
PsyObject
- All Known Implementing Classes:
Interpreter
The representation of
context
, an execution context.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextAction
Context action of thebegin
operator.static final ContextAction
Context action of thecleardictstack
operator.static final ContextAction
Context action of theclearstack
operator.static final ContextAction
Context action of thecleartomark
operator.static final ContextAction
Context action of thecopy
operator.static final ContextAction
Context action of thecountdictstack
operator.static final ContextAction
Context action of thecountexecstack
operator.static final ContextAction
Context action of thecountstack
operator.static final ContextAction
Context action of thecounttomark
operator.static final ContextAction
Context action of thecurrentcontext
operator.static final ContextAction
Context action of thecurrentdict
operator.static final ContextAction
Context action of thedef
operator.static final ContextAction
Context action of thedictstack
operator.static final ContextAction
Context action of thedup
operator.static final ContextAction
Context action of theeditline
operator.static final ContextAction
Context action of theend
operator.static final ContextAction
Context action of theexch
operator.static final ContextAction
Context action of theexec
operator.static final ContextAction
Context action of theexecstack
operator.static final ContextAction
Context action of theexecutive
operator.static final ContextAction
Context action of theexit
operator.static final ContextAction
Context action of thefor
operator.static final ContextAction
Context action of thefork
operator.static final ContextAction
Context action of thehalt
operator.static final ContextAction
Context action of theif
operator.static final ContextAction
Context action of theifelse
operator.static final ContextAction
Context action of theindex
operator.static final ContextAction
Context action of thejoin
operator.static final ContextAction
Context action of theload
operator.static final ContextAction
Context action of theloop
operator.static final ContextAction
Context action of thenamespace
operator.static final ContextAction
Context action of thepop
operator.static final ContextAction
Context action of theprettyprint
operator.static final ContextAction
Context action of theprint
operator.static final ContextAction
Context action of thequit
operator.static final ContextAction
Context action of therepeat
operator.static final ContextAction
Context action of therequire
operator.static final ContextAction
Context action of theroll
operator.static final ContextAction
Context action of thesay
operator.static final ContextAction
Context action of thesleep
operator.static final ContextAction
Context action of thestack
operator.static final ContextAction
Context action of thestop
operator.static final ContextAction
Context action of thestopped
operator.static final ContextAction
Context action of thestore
operator.static final ContextAction
Context action of thetokens
operator.static final ContextAction
Context action of thewarn
operator.static final ContextAction
Context action of thewhere
operator.static final ContextAction
Context action of theyield
operator.Fields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TONAME, PSY_TOSTRING, PSY_TYPE
-
Method Summary
Modifier and TypeMethodDescriptionReturns the current dictionary (the topmost on the dictionary stack).int
Returns the topmost execution level at the loop stack or-1
if the loop stack is empty.int
Returns the topmost execution level at the stop stack or-1
if the stop stack is empty.Returns the dictionary stack.int
Returns the size of the execution stack.Returns the execution stack.void
fork()
long
getId()
boolean
Gets the stopped flag to the specified value.void
handleExecutionStack
(int level) void
void
interpretBraced
(PsyReader oReader) void
join()
Returns the namespace pool.Returns the operand stack.operandStackBacked
(int count) int
Removes the execution level from the loop stack and returns this level or-1
if the loop stack is empty.int
Removes the execution level from the stop stack and returns this level or-1
if the stop stack is empty.static PsyContext
Returns the currently executing context.<T extends PsyObject>
TpsyLoad
(PsyTextual oKey) void
default Optional<PsyFormalDict>
psyWhere
(PsyTextual oKey) int
Pushes the current execution level onto the loop stack and returns this level.int
Pushes the current execution level onto the stop stack and returns this level.void
quit()
void
repl()
void
setStopped
(boolean stopFlag) Sets the stopped flag to the specified value.void
stop_()
Returns the system dictionary.default String
Returns 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, psyToName, psyToString, psyType, typeName
-
Field Details
-
PSY_BEGIN
Context action of thebegin
operator. -
PSY_CLEARDICTSTACK
Context action of thecleardictstack
operator. -
PSY_CLEARSTACK
Context action of theclearstack
operator. -
PSY_CLEARTOMARK
Context action of thecleartomark
operator. -
PSY_COPY
Context action of thecopy
operator. -
PSY_COUNTDICTSTACK
Context action of thecountdictstack
operator. -
PSY_COUNTEXECSTACK
Context action of thecountexecstack
operator. -
PSY_COUNTSTACK
Context action of thecountstack
operator. -
PSY_COUNTTOMARK
Context action of thecounttomark
operator. -
PSY_CURRENTCONTEXT
Context action of thecurrentcontext
operator. -
PSY_CURRENTDICT
Context action of thecurrentdict
operator. -
PSY_DEF
Context action of thedef
operator. -
PSY_DICTSTACK
Context action of thedictstack
operator. -
PSY_DUP
Context action of thedup
operator. -
PSY_EDITLINE
Context action of theeditline
operator. -
PSY_END
Context action of theend
operator. -
PSY_EXCH
Context action of theexch
operator. -
PSY_EXEC
Context action of theexec
operator. -
PSY_EXECSTACK
Context action of theexecstack
operator. -
PSY_EXECUTIVE
Context action of theexecutive
operator. -
PSY_EXIT
Context action of theexit
operator. -
PSY_FOR
Context action of thefor
operator. -
PSY_FORK
Context action of thefork
operator. -
PSY_HALT
Context action of thehalt
operator. -
PSY_IF
Context action of theif
operator. -
PSY_IFELSE
Context action of theifelse
operator. -
PSY_INDEX
Context action of theindex
operator. -
PSY_JOIN
Context action of thejoin
operator. -
PSY_LOAD
Context action of theload
operator. -
PSY_LOOP
Context action of theloop
operator. -
PSY_NAMESPACE
Context action of thenamespace
operator. -
PSY_POP
Context action of thepop
operator. -
PSY_PRETTYPRINT
Context action of theprettyprint
operator. -
PSY_PRINT
Context action of theprint
operator. -
PSY_QUIT
Context action of thequit
operator. -
PSY_REPEAT
Context action of therepeat
operator. -
PSY_REQUIRE
Context action of therequire
operator. -
PSY_ROLL
Context action of theroll
operator. -
PSY_SAY
Context action of thesay
operator. -
PSY_SLEEP
Context action of thesleep
operator. -
PSY_STACK
Context action of thestack
operator. -
PSY_STOP
Context action of thestop
operator. -
PSY_STOPPED
Context action of thestopped
operator. -
PSY_STORE
Context action of thestore
operator. -
PSY_TOKENS
Context action of thetokens
operator. -
PSY_WARN
Context action of thewarn
operator. -
PSY_WHERE
Context action of thewhere
operator. -
PSY_YIELD
Context action of theyield
operator.
-
-
Method Details
-
getId
long getId() -
join
- Throws:
InterruptedException
-
toSyntaxString
Description copied from interface:PsyObject
Returns the syntactic representation of this object.- Specified by:
toSyntaxString
in 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 systemDict()Returns the system dictionary.- Returns:
- the system dictionary.
-
userDict
PsyFormalDict userDict()Returns the user dictionary.- Returns:
- the user dictionary.
-
currentDict
PsyFormalDict currentDict()Returns the current dictionary (the topmost on the dictionary stack).- Returns:
- the current dictionary.
-
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.
-
pushLoopLevel
int pushLoopLevel()Pushes the current execution level onto the loop stack and returns this level.- Returns:
- the current execution level.
-
popLoopLevel
int popLoopLevel()Removes the execution level from the loop stack and returns this level or-1
if the loop stack is empty.- Returns:
- the execution level on the top of the loop stack or
-1
if the loop stack is empty.
-
currentLoopLevel
int currentLoopLevel()Returns the topmost execution level at the loop stack or-1
if the loop stack is empty.- Returns:
- the topmost execution level at the loop stack or
-1
if the loop stack is empty.
-
pushStopLevel
int pushStopLevel()Pushes the current execution level onto the stop stack and returns this level.- Returns:
- the current execution level.
-
popStopLevel
int popStopLevel()Removes the execution level from the stop stack and returns this level or-1
if the stop stack is empty.- Returns:
- the execution level on the top of the stop stack or
-1
if the stop stack is empty.
-
currentStopLevel
int currentStopLevel()Returns the topmost execution level at the stop stack or-1
if the stop stack is empty.- Returns:
- the topmost execution level at the stop stack or
-1
if the stop stack is empty.
-
repl
- Throws:
PsyErrorException
-
getStopped
boolean getStopped()Gets the stopped flag to the specified value.- 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
-
interpretBraced
- Throws:
PsyErrorException
-
operandStackBacked
- Throws:
PsyStackUnderflowException
-
psyWhere
-
psyLoad
- Throws:
PsyUndefinedException
-
psyRequire
- Throws:
PsyErrorException
-