public interface LexicalElement extends SourceLocationBound
Modifier and Type | Field and Description |
---|---|
static int |
TYPE_BOOLEAN |
static int |
TYPE_DOUBLE |
static int |
TYPE_IDENTIFIER |
static int |
TYPE_LONG |
static int |
TYPE_STRING |
static int |
TYPE_SYMBOL |
Modifier and Type | Method and Description |
---|---|
Boolean |
booleanValue() |
Double |
doubleValue() |
String |
getLexeme()
Get the original representation of the lexical element the way it was
specified in the source code.
|
int |
getType()
Get the type of the lexical element.
|
Boolean |
isBoolean() |
Boolean |
isDouble() |
Boolean |
isIdentifier() |
Boolean |
isLineTerminator() |
Boolean |
isLiteralConstant() |
Boolean |
isLong() |
Boolean |
isNumeric() |
Boolean |
isString() |
Boolean |
isSymbol() |
Boolean |
isSymbol(String lexeme)
Return true if the lexical element is a symbol and the lexeme matches the
the actual symbol.
|
Long |
longValue()
Get the long value of the element.
|
String |
stringValue()
Get the string value of the lexical element.
|
getFileName, getLineNumber, getPosition
static final int TYPE_STRING
static final int TYPE_DOUBLE
static final int TYPE_LONG
static final int TYPE_BOOLEAN
static final int TYPE_IDENTIFIER
static final int TYPE_SYMBOL
String getLexeme()
int getType()
String stringValue()
Long longValue()
IllegalArgumentException
Double doubleValue()
Boolean booleanValue()
Boolean isString()
Boolean isDouble()
Boolean isLong()
Boolean isBoolean()
Boolean isNumeric()
Boolean isLiteralConstant()
Boolean isIdentifier()
Boolean isSymbol()
Boolean isSymbol(String lexeme)
lexeme
- to match by the lexical element. The parameter must not ne
null
.lexeme
.Boolean isLineTerminator()
Copyright © 2013 Verhas and Verhas Software Craftsmen. All Rights Reserved.