public class Scanner extends Object
| Modifier and Type | Field and Description |
|---|---|
protected char |
fCurrentChar
Current input character
|
protected int |
fCurrentColumnStartPosition
Column counter for syntax errors
|
protected int |
fCurrentPosition
The position of the current character in the input string
|
protected IParserFactory |
fFactory |
protected String |
fInputString
Current parser input string
|
protected String |
fOperatorString
The last determined operator string
|
protected List<Operator> |
fOperList
protected List
|
protected int |
fToken
Current input token
|
protected int |
numFormat |
protected int |
rowCount
Row counter for syntax errors.
|
static int |
TT_CONSTANT
Token type: constant found in input string
|
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_OPERATOR
Token type: operator found in input string
|
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
|
| Constructor and Description |
|---|
Scanner()
Initialize Scanner without a math-expression
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
getIdentifier() |
protected void |
getNextToken()
Get the next token from the input string
|
protected Object[] |
getNumberString() |
protected List<Operator> |
getOperator() |
protected StringBuffer |
getStringBuffer() |
protected void |
initialize(String s) |
protected void |
throwSyntaxError(String error) |
protected void |
throwSyntaxError(String error,
int errorLength) |
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_PRECEDENCE_OPEN
public static final int TT_PRECEDENCE_CLOSE
public static final int TT_CONSTANT
public static final int TT_OPERATOR
public static final int TT_DIGIT
protected int numFormat
protected IParserFactory fFactory
protected void initialize(String s) throws SyntaxError
SyntaxErrorprotected void getNextToken()
throws SyntaxError
SyntaxErrorprotected void throwSyntaxError(String error) throws SyntaxError
SyntaxErrorprotected void throwSyntaxError(String error, int errorLength) throws SyntaxError
SyntaxErrorprotected String getIdentifier()
protected Object[] getNumberString()
protected StringBuffer getStringBuffer() throws SyntaxError
SyntaxErrorCopyright © 2017 Java Wikipedia API (Bliki engine). All rights reserved.