public class Parser extends Object
Modifier and Type | Class | Description |
---|---|---|
static class |
Parser.ParseException |
Modifier and Type | Method | Description |
---|---|---|
void |
advance(int numChars) |
|
void |
appendToToken(char c) |
|
void |
appendToToken(String str) |
|
String |
currToken() |
Get the current token, and reset the token to empty.
|
void |
expect(char expectedChar) |
|
char |
getc() |
|
int |
getPosition() |
|
String |
getPositionInfo() |
|
Object |
getState() |
|
CharSequence |
getSubsequence(int startPosition,
int endPosition) |
|
String |
getSubstring(int startPosition,
int endPosition) |
|
boolean |
hasMore() |
|
void |
next() |
|
char |
peek() |
|
void |
peekExpect(char expectedChar) |
|
boolean |
peekMatches(String strMatch) |
|
void |
setPosition(int position) |
|
Object |
setState(Object state) |
|
void |
skipWhitespace() |
|
String |
toString() |
public Parser(String string) throws Parser.ParseException
Parser.ParseException
public String getPositionInfo()
public Object getState()
public char getc() throws Parser.ParseException
Parser.ParseException
public char peek()
public void peekExpect(char expectedChar) throws Parser.ParseException
Parser.ParseException
public boolean peekMatches(String strMatch)
public void next()
public void advance(int numChars)
public boolean hasMore()
public int getPosition()
public void setPosition(int position)
public CharSequence getSubsequence(int startPosition, int endPosition)
public String getSubstring(int startPosition, int endPosition)
public void expect(char expectedChar) throws Parser.ParseException
Parser.ParseException
public void appendToToken(String str)
public void appendToToken(char c)
public void skipWhitespace()
public String currToken()
Copyright © 2018. All rights reserved.