Skip navigation links

Oracle Business Rules Java API Reference
10g (10.1.3.1.0)

B28966-01


oracle.rules.sdk.editor.ruleset
Class ExprParser

java.lang.Object
  extended byoracle.rules.sdk.editor.ruleset.ExprParser


public class ExprParser
extends java.lang.Object

Scans an input expression string, and if successful, parses the string. Creates an ordered array of Tokens. Determines which token the cursor is in. Analyzes the expression to determine if it will yield the correct type.


Nested Class Summary
 class ExprParser.Token
          Token represents a lexeme in a parsed expression.

 

Field Summary
static int ERROR_CHARLIT
           
static int ERROR_MISSING_DIMENSIONS
           
static int ERROR_NUMBER
           
static int ERROR_NUMBER_PARMS
           
static int ERROR_PARSE_SEQ
           
static int ERROR_TYPE_INVOCATION
           
static int ERROR_TYPE_OP_TYPE
           
static int ERROR_UNDIMENSIONED
           
static int ERROR_UNKNOWN_CONSTRAINT
           
static int ERROR_UNKNOWN_FUNCTION
           
static int ERROR_UNKNOWN_IDENTIFIER
           
static int ERROR_UNKNOWN_TOKEN
           
static int ERROR_UNMATCHED
           
static int ERROR_UNTERMINATED
           
static int NO_ERROR
           
static int TOKEN_BINARYOP
           
static int TOKEN_BOOLEAN_CONSTANT
           
static int TOKEN_CHARLIT
           
static int TOKEN_CONSTRAINT
           
static int TOKEN_CONSTRUCTOR
           
static int TOKEN_FUNCTION
           
static int TOKEN_IDENTIFIER
           
static int TOKEN_LPAREN
           
static int TOKEN_NULL
           
static int TOKEN_NUMBER
           
static int TOKEN_OP_CONSTRAINT
           
static int TOKEN_OPERAND_CONSTRAINT
           
static int TOKEN_PRE_UNARYOP
           
static int TOKEN_RPAREN
           
static int TOKEN_STRINGLIT
           
static int TOKEN_TYPE_CONSTRAINT
           
static int TOKEN_TYPE_OP
           
static int TOKEN_TYPE_OPERAND
           
static int TOKEN_TYPE_UNKNOWN
           
static int TOKEN_UNKNOWN
           
static int TOKEN_USE_PLIST
           
static int TYPE_MASK
           

 

Constructor Summary
ExprParser(java.lang.String exp, RuleComponent parent, int cursorPos)
          Only scans and parses, does not analyze
ExprParser(java.lang.String exp, RuleComponent parent, int cursorPos, java.util.List variablesInScope, java.util.List RLVariableNames, java.util.List factTypesInScope, java.util.List varIDs, oracle.rules.sdk.datamodel.DataModel dm, oracle.rules.sdk.datamodel.Constant varDef)
           

 

Method Summary
 int[][] balanced(java.lang.String left)
           
 ExprParser.Token getConcatCursorToken()
           
 ExprParser.Token[] getConcatTokens()
           
 ExprParser.Token getCursorToken()
           
 int getCursorTokenIndex()
           
 java.lang.String getRL()
           
 ExprParser.Token[] getTokens()
           
 boolean hasError()
           
 boolean isAnalyzed()
           
static java.lang.String tokenTypeName(int tokenType)
           
 java.lang.String toString()
           
static java.lang.String useName(int use)
           

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

NO_ERROR

public static final int NO_ERROR
See Also:
Constant Field Values

ERROR_UNTERMINATED

public static final int ERROR_UNTERMINATED
See Also:
Constant Field Values

ERROR_UNKNOWN_TOKEN

public static final int ERROR_UNKNOWN_TOKEN
See Also:
Constant Field Values

ERROR_UNMATCHED

public static final int ERROR_UNMATCHED
See Also:
Constant Field Values

ERROR_NUMBER

public static final int ERROR_NUMBER
See Also:
Constant Field Values

ERROR_PARSE_SEQ

public static final int ERROR_PARSE_SEQ
See Also:
Constant Field Values

ERROR_CHARLIT

public static final int ERROR_CHARLIT
See Also:
Constant Field Values

ERROR_UNKNOWN_FUNCTION

public static final int ERROR_UNKNOWN_FUNCTION
See Also:
Constant Field Values

ERROR_UNKNOWN_IDENTIFIER

public static final int ERROR_UNKNOWN_IDENTIFIER
See Also:
Constant Field Values

ERROR_UNKNOWN_CONSTRAINT

public static final int ERROR_UNKNOWN_CONSTRAINT
See Also:
Constant Field Values

ERROR_MISSING_DIMENSIONS

public static final int ERROR_MISSING_DIMENSIONS
See Also:
Constant Field Values

ERROR_UNDIMENSIONED

public static final int ERROR_UNDIMENSIONED
See Also:
Constant Field Values

ERROR_TYPE_OP_TYPE

public static final int ERROR_TYPE_OP_TYPE
See Also:
Constant Field Values

ERROR_TYPE_INVOCATION

public static final int ERROR_TYPE_INVOCATION
See Also:
Constant Field Values

ERROR_NUMBER_PARMS

public static final int ERROR_NUMBER_PARMS
See Also:
Constant Field Values

TYPE_MASK

public static final int TYPE_MASK
See Also:
Constant Field Values

TOKEN_TYPE_OPERAND

public static final int TOKEN_TYPE_OPERAND
See Also:
Constant Field Values

TOKEN_IDENTIFIER

public static final int TOKEN_IDENTIFIER
See Also:
Constant Field Values

TOKEN_FUNCTION

public static final int TOKEN_FUNCTION
See Also:
Constant Field Values

TOKEN_CONSTRUCTOR

public static final int TOKEN_CONSTRUCTOR
See Also:
Constant Field Values

TOKEN_NUMBER

public static final int TOKEN_NUMBER
See Also:
Constant Field Values

TOKEN_STRINGLIT

public static final int TOKEN_STRINGLIT
See Also:
Constant Field Values

TOKEN_CHARLIT

public static final int TOKEN_CHARLIT
See Also:
Constant Field Values

TOKEN_BOOLEAN_CONSTANT

public static final int TOKEN_BOOLEAN_CONSTANT
See Also:
Constant Field Values

TOKEN_NULL

public static final int TOKEN_NULL
See Also:
Constant Field Values

TOKEN_TYPE_OP

public static final int TOKEN_TYPE_OP
See Also:
Constant Field Values

TOKEN_LPAREN

public static final int TOKEN_LPAREN
See Also:
Constant Field Values

TOKEN_RPAREN

public static final int TOKEN_RPAREN
See Also:
Constant Field Values

TOKEN_BINARYOP

public static final int TOKEN_BINARYOP
See Also:
Constant Field Values

TOKEN_PRE_UNARYOP

public static final int TOKEN_PRE_UNARYOP
See Also:
Constant Field Values

TOKEN_TYPE_CONSTRAINT

public static final int TOKEN_TYPE_CONSTRAINT
See Also:
Constant Field Values

TOKEN_CONSTRAINT

public static final int TOKEN_CONSTRAINT
See Also:
Constant Field Values

TOKEN_OP_CONSTRAINT

public static final int TOKEN_OP_CONSTRAINT
See Also:
Constant Field Values

TOKEN_OPERAND_CONSTRAINT

public static final int TOKEN_OPERAND_CONSTRAINT
See Also:
Constant Field Values

TOKEN_TYPE_UNKNOWN

public static final int TOKEN_TYPE_UNKNOWN
See Also:
Constant Field Values

TOKEN_UNKNOWN

public static final int TOKEN_UNKNOWN
See Also:
Constant Field Values

TOKEN_USE_PLIST

public static final int TOKEN_USE_PLIST
See Also:
Constant Field Values

Constructor Detail

ExprParser

public ExprParser(java.lang.String exp,
                  RuleComponent parent,
                  int cursorPos)
Only scans and parses, does not analyze

ExprParser

public ExprParser(java.lang.String exp,
                  RuleComponent parent,
                  int cursorPos,
                  java.util.List variablesInScope,
                  java.util.List RLVariableNames,
                  java.util.List factTypesInScope,
                  java.util.List varIDs,
                  oracle.rules.sdk.datamodel.DataModel dm,
                  oracle.rules.sdk.datamodel.Constant varDef)

Method Detail

hasError

public boolean hasError()

balanced

public int[][] balanced(java.lang.String left)

getTokens

public ExprParser.Token[] getTokens()

isAnalyzed

public boolean isAnalyzed()

getRL

public java.lang.String getRL()

getConcatTokens

public ExprParser.Token[] getConcatTokens()

getConcatCursorToken

public ExprParser.Token getConcatCursorToken()

getCursorToken

public ExprParser.Token getCursorToken()

getCursorTokenIndex

public int getCursorTokenIndex()

toString

public java.lang.String toString()

tokenTypeName

public static java.lang.String tokenTypeName(int tokenType)

useName

public static java.lang.String useName(int use)

Skip navigation links

Oracle Business Rules Java API Reference
10g (10.1.3.1.0)

B28966-01


Copyright © 2006, Oracle. All rights reserved.