Class

org.bitbucket.inkytonik.kiama.parsing.ParsersBase

Parser

Related Doc: package ParsersBase

Permalink

abstract class Parser[+T] extends (Input) ⇒ ParseResult[T]

A parser is a function from a string to a parser result. This kind of parser cannot handle left recursive alternatives and does not memoise its results so it may repeat work. If those properties are desired use the PackratParser type instead.

Self Type
Parser[T]
Source
Parsers.scala
Linear Supertypes
(Input) ⇒ ParseResult[T], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Parser
  2. Function1
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Parser()

    Permalink

Abstract Value Members

  1. abstract def apply(v1: Input): ParseResult[T]

    Permalink
    Definition Classes
    Function1

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def <~[U](q: ⇒ Parser[U]): Parser[T]

    Permalink

    Sequential composition ignoring right side.

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

    Permalink

    Sequential composition with no back-tracking back past this point and ignoring right side.

  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def ?: Parser[Option[T]]

    Permalink

    Optional parsing.

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

    Permalink

    Apply function to successful result.

  8. def ^^^[U](u: ⇒ U): Parser[U]

    Permalink

    Turn a successful result into a specific value which is evaluated each each time this parser is used.

  9. def andThen[A](g: (ParseResult[T]) ⇒ A): (Input) ⇒ A

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  10. def append[U >: T](q: ⇒ Parser[U]): Parser[U]

    Permalink
  11. def apply(str: String): ParseResult[T]

    Permalink

    Alternative entry point to directly parse a string.

  12. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def compose[A](g: (A) ⇒ Input): (A) ⇒ ParseResult[T]

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  15. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def flatMap[U](f: (T) ⇒ Parser[U]): Parser[U]

    Permalink
  19. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. def into[U](fq: (T) ⇒ Parser[U]): Parser[U]

    Permalink

    Parameterise next parse step by result from previous one.

  22. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  23. def map[U](f: (T) ⇒ U): Parser[U]

    Permalink
  24. final def ne(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def |[U >: T](q: ⇒ Parser[U]): Parser[U]

    Permalink

    Alternation.

  33. def ~[U](q: ⇒ Parser[U]): Parser[~[T, U]]

    Permalink

    Sequential composition.

  34. def ~/[U](q: ⇒ Parser[U]): Parser[~[T, U]]

    Permalink

    Sequential composition with no back-tracking back past this point.

    Sequential composition with no back-tracking back past this point. Modelled on same operator in FastParse and ~! in Scala parser combinators.

  35. def ~/>[U](q: ⇒ Parser[U]): Parser[U]

    Permalink

    Sequential composition with no back-tracking back past this point and ignoring left side.

  36. def ~>[U](q: ⇒ Parser[U]): Parser[U]

    Permalink

    Sequential composition ignoring left side.

Inherited from (Input) ⇒ ParseResult[T]

Inherited from AnyRef

Inherited from Any

Ungrouped