|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.neoworks.rdc.Lexer
A lexer class which will turn any input string into a list of tokens given a symbol table. The lexer is constructed by giving it the input string and the tokens to put into the symbol table. Then the list of lexed tokens can be retrived. All the lexing is done at one time not on demand. The list of tokens can then be passed. Using a parser.
Token
,
Current properties
------------------
lineCommentDelim: Character for delimiting a line comment. (String)
handleLineComments: Boolean.TRUE To handle comments, Boolean.FALSE otherwise. (Boolean)
Field Summary | |
static int |
DUMMY
The dummy token type (internal only??) |
static int |
END
The END of the input |
static int |
ID
An identifier token |
static int |
NONE
A not real token (end of input) |
static int |
NUM
A number token |
static int |
STRING
A string token |
Constructor Summary | |
Lexer(java.lang.String inputString,
java.util.Vector newTokens)
Constructor to make a new lexer with the given input string to parse. |
Method Summary | |
java.lang.Object |
getProperty(java.lang.String propertyName)
|
boolean |
getTreatSingleQuoteAsString()
Deprecated. |
TokenList |
lexIt()
Function to lext the input. |
void |
setProperty(java.lang.String propertyName,
java.lang.Object property)
|
void |
setTreatSingleQuoteAsString(boolean b)
Deprecated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DUMMY
public static final int NUM
public static final int ID
public static final int STRING
public static final int NONE
public static final int END
Constructor Detail |
public Lexer(java.lang.String inputString, java.util.Vector newTokens)
inputString
- The input string to lexnewTokens
- The tokens to put into the symbol tableMethod Detail |
public void setTreatSingleQuoteAsString(boolean b)
public boolean getTreatSingleQuoteAsString()
public TokenList lexIt()
public void setProperty(java.lang.String propertyName, java.lang.Object property)
public java.lang.Object getProperty(java.lang.String propertyName)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |