kiama.parsing.Parsers

class ParseResult

[source: kiama/parsing/Parsers.scala]

sealed abstract class ParseResult[+T]
extends AnyRef
Representations of the results of parsing.
Direct Known Subclasses:
Parsers.Success, Parsers.Failure

Value Summary
abstract val in : scala.util.parsing.input.Reader
The input that remains to be consumed.
Method Summary
abstract def append [U >: T](a : => ParseResult[U]) : ParseResult[U]
If this result reflects a successful parse, return it, otherwise return a.
abstract def flatMapWithNext [U](f : (T) => (scala.util.parsing.input.Reader) => ParseResult[U]) : ParseResult[U]
If this result reflects a successful parse, feed the resulting value and the remainder of the input to f to obtain a final result.
abstract def map [U](f : (T) => U) : ParseResult[U]
If this result reflects a successful parse, apply f to the value produced and return the result of that application.
abstract def mapPartial [U](f : scala.PartialFunction[T, U], error : (T) => java.lang.String) : ParseResult[U]
If this result reflects a successful parse, apply the partial function f to the value produced and, if it's defined, return the result of that application. If f is not defined, produce a failure result with the message produced by applying error to the result value.
abstract def position (in : scala.util.parsing.input.Reader) : ParseResult[T]
Set the position of this result to that of in, if it is capable of holding position information and doesn't already have some.
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
abstract val in : scala.util.parsing.input.Reader
The input that remains to be consumed.

Method Details
abstract def map[U](f : (T) => U) : ParseResult[U]
If this result reflects a successful parse, apply f to the value produced and return the result of that application.

abstract def mapPartial[U](f : scala.PartialFunction[T, U], error : (T) => java.lang.String) : ParseResult[U]
If this result reflects a successful parse, apply the partial function f to the value produced and, if it's defined, return the result of that application. If f is not defined, produce a failure result with the message produced by applying error to the result value.

abstract def flatMapWithNext[U](f : (T) => (scala.util.parsing.input.Reader) => ParseResult[U]) : ParseResult[U]
If this result reflects a successful parse, feed the resulting value and the remainder of the input to f to obtain a final result.

abstract def append[U >: T](a : => ParseResult[U]) : ParseResult[U]
If this result reflects a successful parse, return it, otherwise return a.

abstract def position(in : scala.util.parsing.input.Reader) : ParseResult[T]
Set the position of this result to that of in, if it is capable of holding position information and doesn't already have some.