$Id: GenericLexicalAnalyzer.java,v 1.8 2005/06/16 19:58:57 mokhov Exp $
- Since:
- 0.3.0
- Version:
- $Revision: 1.8 $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
oFileReader
protected java.io.FileReader oFileReader
oStreamTokenizer
protected java.io.StreamTokenizer oStreamTokenizer
SourceFilename
protected java.lang.String SourceFilename
- File name of a file which serves as an input
of the Lexical Analyzer.
OutputFilename
protected java.lang.String OutputFilename
- File name of a file which serves as an output
of the Lexical Analyzer.
ErrorLogFilename
protected java.lang.String ErrorLogFilename
- File name of a file which serves as an
lexical errors log.
- Since:
- September 2001
ErrorsPresent
protected boolean ErrorsPresent
- Since:
- October 2, 2001
TokenList
protected java.util.Vector TokenList
SymTab
protected SymbolTable SymTab
LexicalErrors
protected java.util.Vector LexicalErrors
oToken
protected Token oToken
GenericLexicalAnalyzer
public GenericLexicalAnalyzer(SymbolTable pSymTab)
- Constructor.
init
public boolean init()
- Initialization routine.
Should be overridden by derivatives
because it is language-specific, and default
initialization will not always suffice.
scan
public void scan()
- Scan for tokens through the input stream.
serialize
public abstract boolean serialize(int piOperation)
- Load/Save the contents of lists
such as Token list and Error list.
0 means load, 1 means save.
Load currently is not implemented
getNextToken
public abstract Token getNextToken()
- Core method of the LexicalAnalyzer.
createToken
public Token createToken(java.lang.String strLexeme,
TokenSubType oTokenSubType)
- createToken() creates an instance of a Token
data structure provided its type and lexeme,
and location is calculated dynamically by the StreamTokenyzer.
getSourceFilename
public java.lang.String getSourceFilename()
- Access method for the SourceFilename property.
setSourceFilename
public void setSourceFilename(java.lang.String aSourceFilename)
- Sets the value of the SourceFilename property.
getOutputFilename
public java.lang.String getOutputFilename()
- Access method for the OutputFilename property.
setOutputFilename
public void setOutputFilename(java.lang.String aOutputFilename)
- Sets the value of the OutputFilename property.
getErrorLogFilename
public java.lang.String getErrorLogFilename()
- Access method for the ErrorLogFilename property.
setErrorLogFilename
public void setErrorLogFilename(java.lang.String aErrorLogFilename)
- Sets the value of the ErrorLogFilename property.
getErrorsPresent
public boolean getErrorsPresent()
- Determines if the ErrorsPresent property is true.
getTokenList
public java.util.Vector getTokenList()
- Access method for the TonkenList property.
getSymTab
public SymbolTable getSymTab()
- Access method for the SymTab property.
getMARFSourceCodeRevision
public static java.lang.String getMARFSourceCodeRevision()
- Retrieves class' revision.