scala.util.parsing.combinator.Parsers

Parser

class Parser[+T] extends (Reader[Elem]) ⇒ ParseResult[T]

The root class of parsers. Parsers are functions from the Input type to ParseResult

attributes: abstract
known subclasses: OnceParser, OnceParser, OnceParser, OnceParser, OnceParser, OnceParser, OnceParser, OnceParser, OnceParser, OnceParser, PackratParser, OnceParser, OnceParser, OnceParser, OnceParser

Inherits

  1. Function1
  2. AnyRef
  3. Any

Value Members

  1. def *[U >: T](sep: ⇒ Parser[(U, U) ⇒ U]): Parser[U]

    Returns a parser that repeatedly parses what this parser parses, interleaved with the sep' parser

  2. def *: Parser[List[T]]

    Returns a parser that repeatedly parses what this parser parses

  3. def +: Parser[List[T]]

    Returns a parser that repeatedly (at least once) parses what this parser parses

  4. def <~[U](p: ⇒ Parser[U]): Parser[T]

    A parser combinator for sequential composition which keeps only the left result

  5. def >>[U](fq: (T) ⇒ Parser[U]): Parser[U]

    Returns into(fq)

  6. def ?: Parser[Option[T]]

    Returns a parser that optionally parses what this parser parses

  7. def ^?[U](f: PartialFunction[T, U]): Parser[U]

    A parser combinator for partial function application

  8. def ^?[U](f: PartialFunction[T, U], error: (T) ⇒ String): Parser[U]

    A parser combinator for partial function application

  9. def ^^[U](f: (T) ⇒ U): Parser[U]

    A parser combinator for function application

  10. def ^^^[U](r: U): Parser[U]

  11. def andThen[A](g: (ParseResult[T]) ⇒ A): (Reader[Elem]) ⇒ A

    (f andThen g)(x) == g(f(x))

  12. def append[U >: T](p: ⇒ Parser[U]): Parser[U]

  13. def apply(in: Reader[Elem]): ParseResult[T]

    An unspecified method that defines the behaviour of this parser

  14. def compose[A](g: (A) ⇒ Reader[Elem]): (A) ⇒ ParseResult[T]

    (f compose g)(x) == f(g(x))

  15. def equals(arg0: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence

  16. def flatMap[U](f: (T) ⇒ Parser[U]): Parser[U]

  17. def hashCode(): Int

    Returns a hash code value for the object

  18. def into[U](fq: (T) ⇒ Parser[U]): Parser[U]

    A parser combinator that parameterises a subsequent parser with the result of this one

  19. def map[U](f: (T) ⇒ U): Parser[U]

  20. def named(n: String): Parser[T]

  21. def toString(): String

    Returns a string representation of the object

  22. def |[U >: T](q: ⇒ Parser[U]): Parser[U]

    A parser combinator for alternative composition

  23. def |||[U >: T](q: ⇒ Parser[U]): Parser[U]

    A parser combinator for alternative with longest match composition

  24. def ~[U](p: ⇒ Parser[U]): Parser[~[T, U]]

    A parser combinator for sequential composition

  25. def ~![U](p: ⇒ Parser[U]): Parser[~[T, U]]

    A parser combinator for non-back-tracking sequential composition

  26. def ~>[U](p: ⇒ Parser[U]): Parser[U]

    A parser combinator for sequential composition which keeps only the right result

Instance constructors

  1. new Parser()