Package jjparse
Class Parsing.Abort<T>
- Type Parameters:
T- The covariant type of the parsed value, which is unused in case of anParsing.Abort.
Represents a fatal
An
Note: This class is intended to be immutable and hence covariant in its type parameter.
Parsing.Failure.
An
Parsing.Abort prevents backtracking during parsing. In particular, when a Parsing.ChoiceParser fails with
an Parsing.Abort on its first alternative, it does not attempt to apply the second one.
Note: This class is intended to be immutable and hence covariant in its type parameter.
- Author:
- Björn Lötters
- See Also:
-
Field Summary
Fields inherited from class jjparse.Parsing.Failure
messageFields inherited from class jjparse.Parsing.Result
rest -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanisFatal()Checks whether thisParsing.Failureis fatal in the sense that no backtracking shall be applied during parsing.
-
Constructor Details
-
Abort
-
-
Method Details
-
isFatal
public boolean isFatal()Description copied from class:Parsing.FailureChecks whether thisParsing.Failureis fatal in the sense that no backtracking shall be applied during parsing.- Specified by:
isFatalin classParsing<I>.Failure<T>- Returns:
trueif thisParsing.Failureis anParsing.Abortandfalseif it is anParsing.Error.
-