|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ourgrid.common.spec.lexical.CommonLexicalAnalyzer
public class CommonLexicalAnalyzer
This is a Common Lexical Analyzer. It means that it implements the LexicalAnalyzer interface in a simple way.
Constructor Summary | |
---|---|
CommonLexicalAnalyzer(java.lang.String sourceFile)
The CommonLexicalAnalyzer constructor. |
Method Summary | |
---|---|
Token |
getToken()
This is the main function of the lexical analyzer. |
Token |
getToken(TokenDelimiter delimiters)
It will read the next string from source and return the token it represents. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommonLexicalAnalyzer(java.lang.String sourceFile) throws LexicalException
sourceFile
- - is the String that defines where is the file with the
source to be analyzed.
LexicalException
Method Detail |
---|
public Token getToken() throws LexicalException
LexicalAnalyzer
getToken
in interface LexicalAnalyzer
LexicalException
LexicalAnalyzer.getToken()
public Token getToken(TokenDelimiter delimiters) throws LexicalException
LexicalAnalyzer
getToken
in interface LexicalAnalyzer
delimiters
- the set of delimiters that determines the end of token.
LexicalException
- if a I/O problem ocurres at the readerLexicalAnalyzer.getToken(TokenDelimiter)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |