public class Tokenizer extends InputStream
| Constructor and Description |
|---|
Tokenizer(InputStream in,
boolean enclosedContent) |
| Modifier and Type | Method and Description |
|---|---|
Token |
expect(String message) |
Token |
expectIdentifier(String message) |
Token |
expectStringLiteral(String message) |
char |
expectSymbol(String message,
char... symbols) |
String |
getLine(int theLine) |
boolean |
hasNext() |
Token |
next() |
Token |
peek() |
Token |
peek(String message) |
int |
read() |
String |
readUntil(char end,
boolean allowSpaces,
boolean allowNewlines) |
available, close, mark, markSupported, read, read, reset, skippublic Tokenizer(InputStream in, boolean enclosedContent) throws IOException
IOExceptionpublic int read()
read in class InputStreampublic Token expect(String message) throws IOException, TokenizerException
IOExceptionTokenizerExceptionpublic Token peek(String message) throws IOException, TokenizerException
IOExceptionTokenizerExceptionpublic Token peek() throws IOException, TokenizerException
IOExceptionTokenizerExceptionpublic char expectSymbol(String message, char... symbols) throws IOException, TokenizerException
IOExceptionTokenizerExceptionpublic Token expectIdentifier(String message) throws IOException, TokenizerException
IOExceptionTokenizerExceptionpublic Token expectStringLiteral(String message) throws IOException, TokenizerException
IOExceptionTokenizerExceptionpublic boolean hasNext()
throws IOException,
TokenizerException
IOExceptionTokenizerExceptionpublic Token next() throws IOException, TokenizerException
IOExceptionTokenizerExceptionpublic String getLine(int theLine)
public String readUntil(char end, boolean allowSpaces, boolean allowNewlines) throws TokenizerException
TokenizerExceptionCopyright © 2015–2016 morimekta.net. All rights reserved.