Package org.mvel2
Class MVELInterpretedRuntime
java.lang.Object
org.mvel2.compiler.AbstractParser
org.mvel2.MVELInterpretedRuntime
- All Implemented Interfaces:
Serializable
,Parser
The MVEL interpreted runtime, used for fast parse and execution of scripts.
- See Also:
-
Field Summary
FieldsFields inherited from class org.mvel2.compiler.AbstractParser
CLASS_LITERALS, compileMode, ctx, cursor, debugSymbols, dStack, end, expr, fields, GET, GET_OR_CREATE, greedy, lastLineStart, lastNode, lastWasComment, lastWasIdentifier, lastWasLineLabel, length, LEVEL_0_PROPERTY_ONLY, LEVEL_1_BASIC_LANG, LEVEL_2_MULTI_STATEMENT, LEVEL_3_ITERATION, LEVEL_4_ASSIGNMENT, LEVEL_5_CONTROL_FLOW, line, literalOnly, LITERALS, OP_CONTINUE, OP_NOT_LITERAL, OP_OVERFLOW, OP_RESET_FRAME, OP_TERMINATE, OPERATORS, pCtx, REMOVE, SET, splitAccumulator, st, start, stk, variableFactory
-
Constructor Summary
ConstructorsConstructorDescriptionMVELInterpretedRuntime
(char[] expression) MVELInterpretedRuntime
(char[] expr, int start, int offset, Object ctx, VariableResolverFactory resolverFactory) MVELInterpretedRuntime
(char[] expr, int start, int offset, Object ctx, VariableResolverFactory resolverFactory, ParserContext pCtx) MVELInterpretedRuntime
(char[] expression, Object ctx) MVELInterpretedRuntime
(char[] expression, Object ctx, Map<String, Object> variables) MVELInterpretedRuntime
(char[] expr, Object ctx, VariableResolverFactory resolverFactory) MVELInterpretedRuntime
(String expression) MVELInterpretedRuntime
(String expression, Object ctx) MVELInterpretedRuntime
(String expression, Object ctx, VariableResolverFactory resolverFactory) MVELInterpretedRuntime
(String expression, Object ctx, VariableResolverFactory resolverFactory, ParserContext pCtx) MVELInterpretedRuntime
(String expression, VariableResolverFactory resolverFactory) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
hasMore()
parse()
private Object
Main interpreter loop.private int
procBooleanOperator
(int operator) private void
This method peforms the equivilent of an XSWAP operation to flip the operator over to the top of the stack, and loads the stored values on the d-stack onto the main program stack.private boolean
unwindStatement
(int operator) This method is called to unwind the current statement without any reduction or further parsing.Methods inherited from class org.mvel2.compiler.AbstractParser
addFatalError, addFatalError, arithmeticFunctionReduction, captureIdentifier, captureToEOS, captureToEOSorEOL, captureToEOT, captureToNextTokenJunction, expectEOS, expectNextChar_IW, getCursor, getExpression, handleSubstatement, handleUnion, ifThenElseBlockContinues, incNextNonBlank, isArithmeticOperator, isNextIdentifier, isNextIdentifierOrLiteral, isStatementNotManuallyTerminated, lastNonWhite, loadLanguageFeaturesByLevel, lookAhead, lookAhead, lookBehind, lookToLast, nextNonBlank, nextToken, nextTokenSkipSymbols, reduce, setExpression, setExpression, setLanguageLevel, setupParser, skipWhitespace, tokenContinues, trimLeft, trimRight, trimWhitespace
-
Field Details
-
LOG
-
holdOverRegister
-
-
Constructor Details
-
MVELInterpretedRuntime
-
MVELInterpretedRuntime
MVELInterpretedRuntime(char[] expression, Object ctx) -
MVELInterpretedRuntime
MVELInterpretedRuntime(String expression) -
MVELInterpretedRuntime
MVELInterpretedRuntime(char[] expression) -
MVELInterpretedRuntime
-
MVELInterpretedRuntime
public MVELInterpretedRuntime(char[] expr, int start, int offset, Object ctx, VariableResolverFactory resolverFactory) -
MVELInterpretedRuntime
public MVELInterpretedRuntime(char[] expr, int start, int offset, Object ctx, VariableResolverFactory resolverFactory, ParserContext pCtx) -
MVELInterpretedRuntime
public MVELInterpretedRuntime(String expression, Object ctx, VariableResolverFactory resolverFactory) -
MVELInterpretedRuntime
public MVELInterpretedRuntime(String expression, Object ctx, VariableResolverFactory resolverFactory, ParserContext pCtx) -
MVELInterpretedRuntime
MVELInterpretedRuntime(String expression, VariableResolverFactory resolverFactory) -
MVELInterpretedRuntime
-
-
Method Details
-
parse
-
parseAndExecuteInterpreted
Main interpreter loop.- Returns:
- value
-
procBooleanOperator
private int procBooleanOperator(int operator) -
reduceRight
private void reduceRight()This method peforms the equivilent of an XSWAP operation to flip the operator over to the top of the stack, and loads the stored values on the d-stack onto the main program stack. -
hasMore
private boolean hasMore() -
unwindStatement
private boolean unwindStatement(int operator) This method is called to unwind the current statement without any reduction or further parsing.- Parameters:
operator
- -- Returns:
- -
-