Package org.mvel2
Class MVELInterpretedRuntime
- java.lang.Object
-
- org.mvel2.compiler.AbstractParser
-
- org.mvel2.MVELInterpretedRuntime
-
- All Implemented Interfaces:
java.io.Serializable
,Parser
public class MVELInterpretedRuntime extends AbstractParser
The MVEL interpreted runtime, used for fast parse and execution of scripts.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object
holdOverRegister
private static java.util.logging.Logger
LOG
-
Fields 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
Constructors Constructor Description MVELInterpretedRuntime(char[] expression)
MVELInterpretedRuntime(char[] expr, int start, int offset, java.lang.Object ctx, VariableResolverFactory resolverFactory)
MVELInterpretedRuntime(char[] expr, int start, int offset, java.lang.Object ctx, VariableResolverFactory resolverFactory, ParserContext pCtx)
MVELInterpretedRuntime(char[] expression, java.lang.Object ctx)
MVELInterpretedRuntime(char[] expression, java.lang.Object ctx, java.util.Map<java.lang.String,java.lang.Object> variables)
MVELInterpretedRuntime(char[] expr, java.lang.Object ctx, VariableResolverFactory resolverFactory)
MVELInterpretedRuntime(java.lang.String expression)
MVELInterpretedRuntime(java.lang.String expression, java.lang.Object ctx)
MVELInterpretedRuntime(java.lang.String expression, java.lang.Object ctx, VariableResolverFactory resolverFactory)
MVELInterpretedRuntime(java.lang.String expression, java.lang.Object ctx, VariableResolverFactory resolverFactory, ParserContext pCtx)
MVELInterpretedRuntime(java.lang.String expression, VariableResolverFactory resolverFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
hasMore()
java.lang.Object
parse()
private java.lang.Object
parseAndExecuteInterpreted()
Main interpreter loop.private int
procBooleanOperator(int operator)
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.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
-
-
-
-
Constructor Detail
-
MVELInterpretedRuntime
MVELInterpretedRuntime(char[] expression, java.lang.Object ctx, java.util.Map<java.lang.String,java.lang.Object> variables)
-
MVELInterpretedRuntime
MVELInterpretedRuntime(char[] expression, java.lang.Object ctx)
-
MVELInterpretedRuntime
MVELInterpretedRuntime(java.lang.String expression)
-
MVELInterpretedRuntime
MVELInterpretedRuntime(char[] expression)
-
MVELInterpretedRuntime
public MVELInterpretedRuntime(char[] expr, java.lang.Object ctx, VariableResolverFactory resolverFactory)
-
MVELInterpretedRuntime
public MVELInterpretedRuntime(char[] expr, int start, int offset, java.lang.Object ctx, VariableResolverFactory resolverFactory)
-
MVELInterpretedRuntime
public MVELInterpretedRuntime(char[] expr, int start, int offset, java.lang.Object ctx, VariableResolverFactory resolverFactory, ParserContext pCtx)
-
MVELInterpretedRuntime
public MVELInterpretedRuntime(java.lang.String expression, java.lang.Object ctx, VariableResolverFactory resolverFactory)
-
MVELInterpretedRuntime
public MVELInterpretedRuntime(java.lang.String expression, java.lang.Object ctx, VariableResolverFactory resolverFactory, ParserContext pCtx)
-
MVELInterpretedRuntime
MVELInterpretedRuntime(java.lang.String expression, VariableResolverFactory resolverFactory)
-
MVELInterpretedRuntime
MVELInterpretedRuntime(java.lang.String expression, java.lang.Object ctx)
-
-
Method Detail
-
parse
public java.lang.Object parse()
-
parseAndExecuteInterpreted
private java.lang.Object 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:
- -
-
-