public class ParseStateImpl extends java.lang.Object implements ParseState
Constructor and Description |
---|
ParseStateImpl(ParseStateImpl state,
ParseException furthestException) |
ParseStateImpl(java.lang.String literal) |
Modifier and Type | Method and Description |
---|---|
ParseState |
addException(ParseException exception) |
ParseState |
addException(ParseState state) |
ParseState |
addException(java.lang.String message,
int indexReached) |
ParseState |
addException(java.lang.String message,
int indexReached,
java.lang.Exception cause) |
int |
fromIndex() |
ParseState |
fromIndex(int fromIndex) |
ParseException |
getException() |
java.lang.String |
literal() |
<T> ParseResult<T> |
parseTo(int toIndex,
java.util.function.Function<java.lang.String,T> transform) |
ParseState |
pop(Parser<?> expected) |
ParseState |
push(Parser<?> parser) |
boolean |
toEnd() |
ParseState |
toEnd(boolean toEnd) |
public ParseStateImpl(java.lang.String literal)
public ParseStateImpl(ParseStateImpl state, ParseException furthestException)
public java.lang.String literal()
literal
in interface ParseState
public int fromIndex()
fromIndex
in interface ParseState
public ParseState fromIndex(int fromIndex)
fromIndex
in interface ParseState
public boolean toEnd()
toEnd
in interface ParseState
public ParseState toEnd(boolean toEnd)
toEnd
in interface ParseState
public <T> ParseResult<T> parseTo(int toIndex, java.util.function.Function<java.lang.String,T> transform)
parseTo
in interface ParseState
public ParseException getException()
getException
in interface ParseState
public ParseState addException(ParseException exception)
addException
in interface ParseState
public ParseState addException(java.lang.String message, int indexReached)
addException
in interface ParseState
public ParseState addException(java.lang.String message, int indexReached, java.lang.Exception cause)
addException
in interface ParseState
public ParseState addException(ParseState state)
addException
in interface ParseState
public ParseState push(Parser<?> parser)
push
in interface ParseState
public ParseState pop(Parser<?> expected)
pop
in interface ParseState