Package

molecule

parsing

Permalink

package parsing

Parsing utility methods

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. parsing
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
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

    Permalink

    The parse succeeded.

    The parse succeeded.

    An object of this class contains the result of the parse and the remaining segment that can be used in a subsequent parse cycle.

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

    Permalink

    The parse failed.

    The parse failed.

    The error message is constructed lazily for performance when parsers are used in alternative choices. Use extractors to retrieve the message.

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

    Permalink

    Incremental combinator parser.

    Incremental combinator parser.

    Such parser can be used to parse raw ByteBuffer's ala AttoParsec (see molecule-nio). See http://hackage.haskell.org/packages/archive/attoparsec/0.10.1.0/doc/html/Data-Attoparsec-ByteString.html

    A

    the type of the input messages accepted by a parser B the type of the result

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

    Permalink

    Incremental parser

    Incremental parser

    A

    the type of the input messages accepted by a parser B the type of the result

  5. trait Parsers[Elem] extends AnyRef

    Permalink

    Shameless rip of Scala parsers trait

    Shameless rip of Scala parsers trait

    Elem is the type of input elements the provided parsers consume

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

    Permalink

    The parser needs more data.

    The parser needs more data.

    An object of this class contains the parser that must be used to proceed with parsing once more data is available.

Value Members

  1. object Fail

    Permalink
  2. object Parser

    Permalink
  3. object StdErrors

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

    Permalink

    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.

  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]]])

    Permalink

    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.

  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])]])

    Permalink

    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.

Inherited from AnyRef

Inherited from Any

Ungrouped