public class Tokenizer extends Object
| Constructor and Description |
|---|
Tokenizer(InputStream in) |
| Modifier and Type | Method and Description |
|---|---|
Token |
expect(String message) |
Token |
expectIdentifier(String message) |
Token |
expectQualifiedIdentifier(String message) |
void |
expectSymbol(Symbol symbol,
String message) |
String |
getLine(int line) |
boolean |
hasNext() |
Token |
next() |
String |
readUntil(char terminator) |
String |
readUntil(String terminator) |
void |
unshift(Token token) |
public Tokenizer(InputStream in) throws IOException
IOExceptionpublic Token expect(String message) throws IOException, ParseException
IOExceptionParseExceptionpublic void expectSymbol(Symbol symbol, String message) throws IOException, ParseException
IOExceptionParseExceptionpublic Token expectIdentifier(String message) throws IOException, ParseException
IOExceptionParseExceptionpublic Token expectQualifiedIdentifier(String message) throws IOException, ParseException
IOExceptionParseExceptionpublic boolean hasNext()
throws IOException,
ParseException
IOExceptionParseExceptionpublic Token next() throws IOException, ParseException
IOExceptionParseExceptionpublic void unshift(Token token)
public String getLine(int line) throws IOException
IOExceptionpublic String readUntil(char terminator) throws IOException
IOExceptionpublic String readUntil(String terminator) throws IOException
IOExceptionCopyright © 2016. All rights reserved.