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, skip
public Tokenizer(InputStream in, boolean enclosedContent) throws IOException
IOException
public int read()
read
in class InputStream
public Token expect(String message) throws IOException, TokenizerException
IOException
TokenizerException
public Token peek(String message) throws IOException, TokenizerException
IOException
TokenizerException
public Token peek() throws IOException, TokenizerException
IOException
TokenizerException
public char expectSymbol(String message, char... symbols) throws IOException, TokenizerException
IOException
TokenizerException
public Token expectIdentifier(String message) throws IOException, TokenizerException
IOException
TokenizerException
public Token expectStringLiteral(String message) throws IOException, TokenizerException
IOException
TokenizerException
public boolean hasNext() throws IOException, TokenizerException
IOException
TokenizerException
public Token next() throws IOException, TokenizerException
IOException
TokenizerException
public String getLine(int theLine)
public String readUntil(char end, boolean allowSpaces, boolean allowNewlines) throws TokenizerException
TokenizerException
Copyright © 2015–2016 morimekta.net. All rights reserved.