Modifier and Type | Field and Description |
---|---|
protected char |
fCurrentChar |
protected int |
fCurrentColumnStartPosition |
protected int |
fCurrentPosition |
protected IParserFactory |
fFactory |
protected String |
fInputString |
protected String |
fOperatorString |
protected List<Operator> |
fOperList |
protected int |
fToken |
protected int |
numFormat |
protected int |
rowCount
Row counter for syntax errors.
|
static int |
TT_ARGUMENTS_CLOSE
Token type: closing bracket for function arguments.
|
static int |
TT_ARGUMENTS_OPEN
Token type: opening bracket for function arguments.
|
static int |
TT_BLANK
Token type: pattern placeholder '_'.
|
static int |
TT_COMMA
',' operator.
|
static int |
TT_DIGIT
Token type: digit 0,1,2,3,4,5,6,7,8,9.
|
static int |
TT_EOF
Token type: End-of_File.
|
static int |
TT_FLOATING_POINT
Token type: floating point number.
|
static int |
TT_IDENTIFIER
Token type: identifier name.
|
static int |
TT_LIST_CLOSE
Token type: closing curly braces '}' for ending lists.
|
static int |
TT_LIST_OPEN
Token type: opening curly braces '{' for starting lists.
|
static int |
TT_OPERATOR
Token type: operator found in input string.
|
static int |
TT_PARTCLOSE
Token type: closing brackets for ending the "index part" of an
expression.
|
static int |
TT_PARTOPEN
Token type: opening brackets for starting the "index part" of
an expression.
|
static int |
TT_PERCENT
'%' operator.
|
static int |
TT_PRECEDENCE_CLOSE
Token type: closing bracket ')' for sub-formulas with higher precedence.
|
static int |
TT_PRECEDENCE_OPEN
Token type: opening bracket '(' for sub-formulas with higher precedence.
|
static int |
TT_SLOT
Token type: slot #.
|
static int |
TT_SLOTSEQUENCE
Token type: slot sequence ##.
|
static int |
TT_STRING
Token type: string surrounded by "....
|
Constructor and Description |
---|
Scanner()
Initialize Scanner without a math-expression.
|
Modifier and Type | Method and Description |
---|---|
protected String |
getIdentifier()
Gets the identifier.
|
protected void |
getNextToken()
getNextToken
|
protected Object[] |
getNumberString()
Gets the number string.
|
protected List<Operator> |
getOperator()
getOperator.
|
protected StringBuffer |
getStringBuffer()
Gets the string buffer.
|
protected void |
initialize(String s)
Initialize.
|
protected void |
throwSyntaxError(String error)
Throw syntax error.
|
protected void |
throwSyntaxError(String error,
int errorLength)
Throw syntax error.
|
protected String fInputString
protected char fCurrentChar
protected int fCurrentPosition
protected int fToken
protected String fOperatorString
protected int rowCount
protected int fCurrentColumnStartPosition
public static final int TT_EOF
public static final int TT_FLOATING_POINT
public static final int TT_ARGUMENTS_OPEN
public static final int TT_ARGUMENTS_CLOSE
public static final int TT_PRECEDENCE_OPEN
public static final int TT_PRECEDENCE_CLOSE
public static final int TT_LIST_OPEN
public static final int TT_LIST_CLOSE
public static final int TT_PARTOPEN
public static final int TT_PARTCLOSE
public static final int TT_OPERATOR
public static final int TT_COMMA
public static final int TT_PERCENT
public static final int TT_STRING
public static final int TT_BLANK
public static final int TT_IDENTIFIER
public static final int TT_DIGIT
public static final int TT_SLOT
public static final int TT_SLOTSEQUENCE
protected int numFormat
protected IParserFactory fFactory
protected void initialize(String s) throws SyntaxError
s
- the sSyntaxError
- the syntax errorprotected void getNextToken() throws SyntaxError
SyntaxError
- if any.protected void throwSyntaxError(String error) throws SyntaxError
error
- the errorSyntaxError
- the syntax errorprotected void throwSyntaxError(String error, int errorLength) throws SyntaxError
error
- the errorerrorLength
- the error lengtherrorLength
- the error lengthSyntaxError
- the syntax errorprotected String getIdentifier()
protected Object[] getNumberString()
protected StringBuffer getStringBuffer() throws SyntaxError
SyntaxError
- the syntax errorCopyright © 2017. All rights reserved.