public class StrictScanner extends java.lang.Object implements IScanner
ILenientScanner
and converts tokens of
ETokenType.ETokenClass.ERROR
into ScannerException
s.Constructor and Description |
---|
StrictScanner(ILenientScanner scanner)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close scanner and any underlying readers.
|
IToken |
getNextToken()
Returns the next token.
|
void |
reset(java.io.Reader reader,
java.lang.String originId)
Reset the scanner.
|
public StrictScanner(ILenientScanner scanner)
scanner
- wrapped ILenientScanner
public IToken getNextToken() throws java.io.IOException, ScannerException
getNextToken
in interface IScanner
ETokenType.EOF
when current file
is entirely scanned.java.io.IOException
- Thrown if the scanner encounters problem during file I/O.ScannerException
- Thrown upon scanner problems.public void close() throws java.io.IOException