class SiteCatalogTextScanner extends Object
Modifier and Type | Field and Description |
---|---|
private LineNumberReader |
m_in
Stores the stream from which we are currently scanning.
|
private int |
m_lookAhead
Captures the look-ahead character.
|
Constructor and Description |
---|
SiteCatalogTextScanner(Reader reader)
Starts to scan the given stream.
|
Modifier and Type | Method and Description |
---|---|
int |
getLineNumber()
Obtains the current line number in the input stream from the outside.
|
boolean |
hasMoreTokens()
Checks for the availability of more input.
|
Token |
nextToken()
Obtains the next token from the input stream.
|
private void |
skipWhitespace()
Skips any white space and comments in the input.
|
private LineNumberReader m_in
private int m_lookAhead
public SiteCatalogTextScanner(Reader reader) throws IOException
reader
- the reader stream from which we are reading the site catalog.IOException
public int getLineNumber()
private void skipWhitespace() throws IOException
IOException
public boolean hasMoreTokens() throws IOException
IOException
public Token nextToken() throws IOException, ScannerException
IOException
- if something went wrong while readingException
- if a lexical error was encountered.ScannerException