Object

scala.meta.internal.fastparse.parsers

Combinators

Related Doc: package parsers

Permalink

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

    Permalink

    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

    Permalink
  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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

  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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    Repeats the parser over and over.

    Repeats the parser over and over. Succeeds with a collection.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

    Permalink

    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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object Either extends Serializable

    Permalink
  5. object Sequence extends Serializable

    Permalink

    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

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped