Packages

o

fastparse.parsers

Combinators

object Combinators

Parsers which are made up of other parsers, adding to or combining their behavior

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Combinators
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Capturing [Elem, Repr](p: Parser[_, Elem, Repr])(implicit repr: ReprOps[Elem, Repr]) extends Parser[Repr, Elem, Repr] with Product with Serializable

    Captures the string parsed by the given parser p.

  2. case class Cut [T, Elem, Repr](p: Parser[T, Elem, Repr])(implicit repr: ReprOps[Elem, Repr]) extends Parser[T, Elem, Repr] with Product with Serializable
  3. case class Either [T, Elem, Repr](ps: Parser[T, Elem, Repr]*)(implicit repr: ReprOps[Elem, Repr]) extends Parser[T, Elem, Repr] with Product with Serializable

    Parses using one parser or the other, if the first one fails.

    Parses using one parser or the other, if the first one fails. Returns the first one that succeeds and fails if both fail

  4. case class Logged [+T, Elem, Repr](p: Parser[T, Elem, Repr], msg: String, output: (String) ⇒ Unit)(implicit repr: ReprOps[Elem, Repr]) extends Parser[T, Elem, Repr] with Product with Serializable

    Wraps a parser and prints out the indices where it starts and ends, together with its result

  5. case class Lookahead [Elem, Repr](p: Parser[_, Elem, Repr])(implicit repr: ReprOps[Elem, Repr]) extends Parser[Unit, Elem, Repr] with Product with Serializable

    Wraps another parser, succeeding/failing identically but consuming no input

  6. case class NoCut [T, Elem, Repr](p: Parser[T, Elem, Repr])(implicit repr: ReprOps[Elem, Repr]) extends Parser[T, Elem, Repr] with Product with Serializable

  7. case class NoTrace [T, Elem, Repr](p: Parser[T, Elem, Repr])(implicit repr: ReprOps[Elem, Repr]) extends Parser[T, Elem, Repr] with Product with Serializable

    Wrap a parser in this if you don't want for it to show up in a stack trace

  8. case class Not [Elem, Repr](p: Parser[_, Elem, Repr])(implicit repr: ReprOps[Elem, Repr]) extends Parser[Unit, Elem, Repr] with Product with Serializable

    Wraps another parser, succeeding it it fails and failing if it succeeds.

    Wraps another parser, succeeding it it fails and failing if it succeeds. Neither case consumes any input

  9. case class Opaque [+T, Elem, Repr](p: Parser[T, Elem, Repr], msg: String)(implicit repr: ReprOps[Elem, Repr]) extends Parser[T, Elem, Repr] with Product with Serializable

    A wrapper that replaces target parser and its inner parsers in the stack trace.

    A wrapper that replaces target parser and its inner parsers in the stack trace. Useful for providing more high-level error messages without going into details. For example, "expected CharPred(...)..." can become "expected IDENT...".

    msg

    The message for the wrapper

  10. case class Optional [+T, R, Elem, Repr](p: Parser[T, Elem, Repr])(implicit ev: Optioner[T, R], repr: ReprOps[Elem, Repr]) extends Parser[R, Elem, Repr] with Product with Serializable

    Wraps a parser and succeeds with Some if p succeeds, and succeeds with None if p fails.

  11. case class Repeat [T, +R, Elem, Repr](p: Parser[T, Elem, Repr], min: Int, max: Int, delimiter: Parser[_, Elem, Repr])(implicit ev: Repeater[T, R], repr: ReprOps[Elem, Repr]) extends Parser[R, Elem, Repr] with Product with Serializable

    Repeats the parser over and over.

    Repeats the parser over and over. Succeeds with a Seq of results if there are more than min and less than max successful parses. The range min and max bounds are inclusive. It uses the delimiter parser between parses and discards its results.

  12. case class Rule [+T, Elem, Repr](name: String, p: () ⇒ Parser[T, Elem, Repr])(implicit repr: ReprOps[Elem, Repr]) extends Parser[T, Elem, Repr] with Product with Serializable

    A top-level, named parser.

    A top-level, named parser. Lazily evaluates the wrapped parser p only when parse is called to allow for circular dependencies between parsers.

  13. case class Sequence [+T1, +T2, R, Elem, Repr](p1: Parser[T1, Elem, Repr], p2: Parser[T2, Elem, Repr], cut: Boolean)(implicit ev: Sequencer[T1, T2, R], repr: ReprOps[Elem, Repr]) extends Parser[R, Elem, Repr] with Product with Serializable

    Parsers two things in a row, returning a tuple of the two results if both things succeed

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. object Either extends Serializable
  21. object Sequence extends Serializable

    Contains an optimized version of Sequence called Sequence.Flat that combines a tree of Sequence nodes from the left, into a single tail-recursive function working over a Vector of their contents.

    Contains an optimized version of Sequence called Sequence.Flat that combines a tree of Sequence nodes from the left, into a single tail-recursive function working over a Vector of their contents.

    Intentionally completely type-unsafe internally, using casting all over the place, because it's near impossible to make the variable-length heterogenous-typed list type-safe without going crazy. If constructed by flatten-ing out a Sequence, the types are checked when the Sequence was constructed, so it's still safe.

    Appears to speed up the scalaparse.PerfTests benchmark by around 2.5x

Inherited from AnyRef

Inherited from Any

Ungrouped