|
ElegantJ Data Tables Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.elegantj.data.parser.Scanner
The Scanner class represents the functionality of the scanning the buffer to get tokens.
| Field Summary | |
static int |
maxSymLen
Specifies the maximum symbol length |
static java.lang.String[] |
sharedCharacters
Specifies the shared characters that can be scanned |
static java.lang.String[] |
sharedOperators
Specifies the shared operators that can be scanned |
static int |
stError
A constant used for representing the scanning error status |
static int |
stOk
A constant used for representing the scanning ok status |
static int |
stQuit
A constant used for representing the scanning quit status |
static int |
tAnd
A constant used for representing the logical and operation |
static int |
tAssign
A constant used for representing the assigning operation |
static int |
tCharacter
A constant used for representing the character |
static int |
tCom
A constant used for representing the arguments in the symbolic operation |
static int |
tDivide
A constant used for representing the dividing operation |
static int |
tDouble
A constant used for representing the double |
static int |
tEnd
A constant used for representing the scanning end status |
static int |
tEqual
A constant used for representing the equal to operator in the comparing operation |
static int |
tError
A constant used for representing the scanning error status |
static int |
tGreater
A constant used for representing the greater then operator in the comparing operation |
static int |
tGreaterEqual
A constant used for representing the greater then or equals to operator in the comparing operation |
static int |
tIdent
A constant used for representing the symbolic operation |
static int |
tInteger
A constant used for representing the integer |
static int |
tLess
A constant used for representing the less then operator in the comparing operation |
static int |
tLessEqual
A constant used for representing the less then or equal to operator in the comparing operation |
static int |
tLParen
A constant used for representing the left parenthesis |
static int |
tMinus
A constant used for representing the substracting operation |
static int |
tMult
A constant used for representing the multiplying operation |
static int |
tNotEqual
A constant used for representing the not equal to operator in the comparing operation |
static int |
tOr
A constant used for representing the logical or operation |
static int |
tPlus
A constant used for representing the adding operation |
static int |
tPow
A constant used for representing the powering operation |
static int |
tRParen
A constant used for representing the right parenthesis |
static int |
tStart
A constant used for representing the scanning start status |
static int |
tString
A constant used for representing the string |
| Constructor Summary | |
Scanner()
|
|
Scanner(java.lang.String buf_in)
Creates a Scanner with specified buffer for scanning |
|
| Method Summary | |
int |
accept()
Determines whether the buffer are acceptable or not, if acceptable it will scan the buffer and return the valid token |
void |
eatCharacter()
Scans the character |
char |
getCharacter()
Returns the character token |
double |
getDouble()
Returns the double token |
int |
getInteger()
Returns the integer token |
int |
getPosition()
Returns the current pointer of the scanner |
java.lang.String |
getString()
Returns the string token |
java.lang.String |
getSymbolName()
Returns the symbol name |
int |
getToken()
Returns the current token type |
void |
reset()
Resets the scanning |
void |
scanBuffer()
Scans the buffer |
void |
setBuffer(java.lang.String buf_in)
Sets the string buffer for scanning |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String[] sharedOperators
public static final java.lang.String[] sharedCharacters
public static final int maxSymLen
public static final int stOk
public static final int stQuit
public static final int stError
public static final int tStart
public static final int tEnd
public static final int tError
public static final int tPlus
public static final int tMult
public static final int tDivide
public static final int tMinus
public static final int tLParen
public static final int tRParen
public static final int tAssign
public static final int tPow
public static final int tIdent
public static final int tCom
public static final int tAnd
public static final int tOr
public static final int tLess
public static final int tGreater
public static final int tLessEqual
public static final int tGreaterEqual
public static final int tNotEqual
public static final int tEqual
public static final int tInteger
public static final int tDouble
public static final int tCharacter
public static final int tString
| Constructor Detail |
public Scanner()
public Scanner(java.lang.String buf_in)
buf_in - the string buffer to be scanned, default ""| Method Detail |
public void setBuffer(java.lang.String buf_in)
buf_in - the string buffer to be scannedpublic void reset()
public void scanBuffer()
public int getToken()
public int getPosition()
public int getInteger()
public double getDouble()
public java.lang.String getString()
public char getCharacter()
public java.lang.String getSymbolName()
public void eatCharacter()
public int accept()
|
ElegantJ Data Tables Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||