Packages

c

info.kwarc.mmt.imps.ParserWithSourcePosition

ParserWithSourcePosition

class ParserWithSourcePosition[T <: DefForm] extends Parser[T]

This little ray of sunshine class allows the usage of Parser Combinators while also delivering SourceRefs (or at least SourcePositions), which previously required state.

T

The type of the def-form, needs to implement trait DefForm.

Source
ParserWithSourcePosition.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ParserWithSourcePosition
  2. Parser
  3. Function1
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ParserWithSourcePosition(p: ParserWithSourcePosition.Parser[T])

    p

    "Innocent" parser that just does the parsing, without SourceRefs.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def *[U >: T](sep: ⇒ ParserWithSourcePosition.Parser[(U, U) ⇒ U]): ParserWithSourcePosition.Parser[U]
    Definition Classes
    Parser
  4. def *: ParserWithSourcePosition.Parser[List[T]]
    Definition Classes
    Parser
  5. def +: ParserWithSourcePosition.Parser[List[T]]
    Definition Classes
    Parser
  6. def <~[U](q: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[T]
    Definition Classes
    Parser
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.

  7. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def >>[U](fq: (T) ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
    Definition Classes
    Parser
  9. def ?: ParserWithSourcePosition.Parser[Option[T]]
    Definition Classes
    Parser
  10. def ^?[U](f: PartialFunction[T, U]): ParserWithSourcePosition.Parser[U]
    Definition Classes
    Parser
  11. def ^?[U](f: PartialFunction[T, U], error: (T) ⇒ String): ParserWithSourcePosition.Parser[U]
    Definition Classes
    Parser
  12. def ^^[U](f: (T) ⇒ U): ParserWithSourcePosition.Parser[U]
    Definition Classes
    Parser
  13. def ^^^[U](v: ⇒ U): ParserWithSourcePosition.Parser[U]
    Definition Classes
    Parser
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.

  14. def andThen[A](g: (ParserWithSourcePosition.ParseResult[T]) ⇒ A): (ParserWithSourcePosition.Input) ⇒ A
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  15. def append[U >: T](p0: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
    Definition Classes
    Parser
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.

  16. def apply(in: ParserWithSourcePosition.Input): ParserWithSourcePosition.ParseResult[T]
    Definition Classes
    ParserWithSourcePosition → Parser → Function1
  17. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  18. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  19. def compose[A](g: (A) ⇒ ParserWithSourcePosition.Input): (A) ⇒ ParserWithSourcePosition.ParseResult[T]
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  20. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  22. def filter(p: (T) ⇒ Boolean): ParserWithSourcePosition.Parser[T]
    Definition Classes
    Parser
  23. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def flatMap[U](f: (T) ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
    Definition Classes
    Parser
  25. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. def into[U](fq: (T) ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
    Definition Classes
    Parser
  28. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  29. def map[U](f: (T) ⇒ U): ParserWithSourcePosition.Parser[U]
    Definition Classes
    Parser
  30. def named(n: String): ParserWithSourcePosition.this.type
    Definition Classes
    Parser
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  34. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  35. def toString(): String
    Definition Classes
    Parser → Function1 → AnyRef → Any
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  39. def withErrorMessage(msg: String): ParserWithSourcePosition.Parser[T]
    Definition Classes
    Parser
  40. def withFailureMessage(msg: String): ParserWithSourcePosition.Parser[T]
    Definition Classes
    Parser
  41. def withFilter(p: (T) ⇒ Boolean): ParserWithSourcePosition.Parser[T]
    Definition Classes
    Parser
  42. def |[U >: T](q: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
    Definition Classes
    Parser
  43. def |||[U >: T](q0: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
    Definition Classes
    Parser
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.

  44. def ~[U](q: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[ParserWithSourcePosition.~[T, U]]
    Definition Classes
    Parser
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.

  45. def ~![U](p: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[ParserWithSourcePosition.~[T, U]]
    Definition Classes
    Parser
  46. def ~>[U](q: ⇒ ParserWithSourcePosition.Parser[U]): ParserWithSourcePosition.Parser[U]
    Definition Classes
    Parser
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) The call-by-name argument is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.

Inherited from (ParserWithSourcePosition.Input) ⇒ ParserWithSourcePosition.ParseResult[T]

Inherited from AnyRef

Inherited from Any

Ungrouped