molecule

parsing

package parsing

Parsing utility methods

Visibility
  1. Public
  2. All

Type Members

  1. case class Done[+B, +A](result: B, rem: Seg[A]) extends ParseResult[B, A] with Product with Serializable

    The parse succeeded.

  2. class Fail extends Signal with ParseResult[Nothing, Nothing]

    The parse failed.

  3. sealed trait ParseResult[+B, +A] extends AnyRef

    Incremental combinator parser.

  4. abstract class Parser[A, +B] extends AnyRef

    Incremental parser

  5. trait Parsers[Elem] extends AnyRef

    Shameless rip of Scala parsers trait

  6. case class Partial[+B, A](parser: Parser[A, B]) extends ParseResult[B, A] with Product with Serializable

    The parser needs more data.

Value Members

  1. object Fail extends AnyRef

  2. object Parser extends AnyRef

  3. object StdErrors extends AnyRef

  4. def parseFinish[A, B](reset: Parser[A, B], parser: Parser[A, B], as: Seg[A], signal: Signal): (Seg[B], Option[Fail])

    Parse all the messages in the last segment received on a channel.

    Parse all the messages in the last segment received on a channel.

    reset

    the parser in an initial state

    parser

    the parser in a subsequent state

    as

    the last segment

    signal

    the signal accompanying the last segment

    returns

    a segment of the last successfully parsed messages and an option indicating whether the last parse failed or not.

    Definition Classes
    package
  5. def parsePartial[A, B](reset: Parser[A, B], parser: Parser[A, B], as: Seg[A]): (Seg[B], Option[Either[(Fail, Seg[A]), Parser[A, B]]])

    Apply a parser until it fails or there is no more data.

    Apply a parser until it fails or there is no more data.

    reset

    the parser in an initial state

    parser

    the parser in a subsequent state

    as

    the segment to parse

    returns

    the resulting messages and, optionally, either the segment that could not be consumed because of a failure or a partial result because more data is required. None means that all the segment has been parsed successfully and that no intermediate state is left.

    Definition Classes
    package
  6. def parseProbe[A, B](reset: Parser[A, B], parser: Parser[A, B], as: Seg[A], signal: Signal): (Seg[B], Option[Either[Fail, (Fail, Seg[A])]])

    Parse all the messages in the last segment received on a channel.

    Parse all the messages in the last segment received on a channel.

    reset

    the parser in an initial state

    parser

    the parser in a subsequent state

    as

    the last segment

    signal

    the signal accompanying the last segment

    returns

    a segment of the last successfully parsed messages and an option indicating whether the last parse failed or not. In case there is a failure and it is recoverable, the last segment that lead to the failure is returned with it.

    Definition Classes
    package