Class BasicParseError
java.lang.Object
org.parboiled.errors.BasicParseError
- All Implemented Interfaces:
ParseError
- Direct Known Subclasses:
ActionError, InvalidInputError
A basic
ParseError implementation for a one-char parse error with an optional error message.-
Constructor Summary
ConstructorsConstructorDescriptionBasicParseError(InputBuffer inputBuffer, int errorIndex, String errorMessage) -
Method Summary
Modifier and TypeMethodDescriptionintGets the end index of the parse error in the underlying input buffer.An optional error message.intGets the inputbuffer this error occurred in.intGets the start index of the parse error in the underlying input buffer.voidsetEndIndex(int endIndex) voidshiftIndexDeltaBy(int delta)
-
Constructor Details
-
BasicParseError
-
-
Method Details
-
getInputBuffer
Description copied from interface:ParseErrorGets the inputbuffer this error occurred in.- Specified by:
getInputBufferin interfaceParseError- Returns:
- the inputbuffer
-
getStartIndex
public int getStartIndex()Description copied from interface:ParseErrorGets the start index of the parse error in the underlying input buffer.- Specified by:
getStartIndexin interfaceParseError- Returns:
- the input index of the first character covered by this error
-
getEndIndex
public int getEndIndex()Description copied from interface:ParseErrorGets the end index of the parse error in the underlying input buffer.- Specified by:
getEndIndexin interfaceParseError- Returns:
- the end index of this error, i.e. the index of the character immediately following the last character covered by this error
-
setEndIndex
public void setEndIndex(int endIndex) -
getErrorMessage
Description copied from interface:ParseErrorAn optional error message.- Specified by:
getErrorMessagein interfaceParseError- Returns:
- an optional error message.
-
getIndexDelta
public int getIndexDelta() -
shiftIndexDeltaBy
public void shiftIndexDeltaBy(int delta)
-