Packages

  • package root

    This is the documentation for Parsley.

    This is the documentation for Parsley.

    Package structure

    The parsley package contains the Parsley class, as well as the Result, Success, and Failure types. In addition to these, it also contains the following packages and "modules" (a module is defined as being an object which mocks a package):

    • parsley.Parsley contains the bulk of the core "function-style" combinators.
    • parsley.combinator contains many helpful combinators that simplify some common parser patterns.
    • parsley.character contains the combinators needed to read characters and strings, as well as combinators to match specific sub-sets of characters.
    • parsley.debug contains debugging combinators, helpful for identifying faults in parsers.
    • parsley.expr contains the following sub modules:
      • parsley.expr.chain contains combinators used in expression parsing
      • parsley.expr.precedence is a builder for expression parsers built on a precedence table.
      • parsley.expr.infix contains combinators used in expression parsing, but with more permissive types than their equivalents in chain.
      • parsley.expr.mixed contains combinators that can be used for expression parsing, but where different fixities may be mixed on the same level: this is rare in practice.
    • parsley.syntax contains several implicits to add syntactic sugar to the combinators. These are sub-categorised into the following sub modules:
      • parsley.syntax.character contains implicits to allow you to use character and string literals as parsers.
      • parsley.syntax.lift enables postfix application of the lift combinator onto a function (or value).
      • parsley.syntax.zipped enables boths a reversed form of lift where the function appears on the right and is applied on a tuple (useful when type inference has failed) as well as a .zipped method for building tuples out of several combinators.
      • parsley.syntax.extension contains syntactic sugar combinators exposed as implicit classes.
    • parsley.errors contains modules to deal with error messages, their refinement and generation.
    • parsley.lift contains functions which lift functions that work on regular types to those which now combine the results of parsers returning those same types. these are ubiquitous.
    • parsley.ap contains functions which allow for the application of a parser returning a function to several parsers returning each of the argument types.
    • parsley.state contains combinators that interact with the context-sensitive functionality in the form of state.
    • parsley.token contains the Lexer class that provides a host of helpful lexing combinators when provided with the description of a language.
    • parsley.position contains parsers for extracting position information.
    • parsley.generic contains some basic implementations of the Parser Bridge pattern (see Design Patterns for Parser Combinators in Scala, or the parsley wiki): these can be used before more specialised generic bridge traits can be constructed.
    Definition Classes
    root
  • package parsley
    Definition Classes
    root
  • object generic

    This module contains the definition of 23 basic generic parser bridge traits, which are used to implement the Parser Bridge pattern for types that do not require metadata.

    This module contains the definition of 23 basic generic parser bridge traits, which are used to implement the Parser Bridge pattern for types that do not require metadata.

    The traits within are designed to be extended by the companion object of some case class that is produced as the result of a parser: by using these traits, it enables a new apply method that makes it appear like the constructor is applied to the parsers themselves. This can be very useful for performing extra verification on the produced results, or to incorporate metadata into the result. Specifically, these traits are designed to be the bare-minimum functionaity, and do not interact with any metadata.

    Definition Classes
    parsley
    Since

    4.5.0

  • ParserBridge0
  • ParserBridge1
  • ParserBridge10
  • ParserBridge11
  • ParserBridge12
  • ParserBridge13
  • ParserBridge14
  • ParserBridge15
  • ParserBridge16
  • ParserBridge17
  • ParserBridge18
  • ParserBridge19
  • ParserBridge2
  • ParserBridge20
  • ParserBridge21
  • ParserBridge22
  • ParserBridge3
  • ParserBridge4
  • ParserBridge5
  • ParserBridge6
  • ParserBridge7
  • ParserBridge8
  • ParserBridge9
  • ParserSingletonBridge
t

parsley.generic

ParserBridge21

trait ParserBridge21[-T1, -T2, -T3, -T4, -T5, -T6, -T7, -T8, -T9, -T10, -T11, -T12, -T13, -T14, -T15, -T16, -T17, -T18, -T19, -T20, -T21, +R] extends ParserSingletonBridge[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) => R]

Generic bridge trait for types that have constructors of arity 21.

Source
generic.scala
Linear Supertypes
ParserSingletonBridge[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) => R], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ParserBridge21
  2. ParserSingletonBridge
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def apply(x1: T1, x2: T2, x3: T3, x4: T4, x5: T5, x6: T6, x7: T7, x8: T8, x9: T9, x10: T10, x11: T11, x12: T12, x13: T13, x14: T14, x15: T15, x16: T16, x17: T17, x18: T18, x19: T19, x20: T20, x21: T21): R

    The abstract hook method: this is the method that should be used to combine the results of the parsers provided to the template method into the result type R.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def <#(op: Parsley[_]): Parsley[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) => R]

    The syntax on this implementing type that performs the parser and returns con.

    The syntax on this implementing type that performs the parser and returns con.

    op

    the parser that should be parsed before returning con.

    Definition Classes
    ParserSingletonBridge
    Note

    equivalent to from.

  4. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  5. def apply(x1: Parsley[T1], x2: => Parsley[T2], x3: => Parsley[T3], x4: => Parsley[T4], x5: => Parsley[T5], x6: => Parsley[T6], x7: => Parsley[T7], x8: => Parsley[T8], x9: => Parsley[T9], x10: => Parsley[T10], x11: => Parsley[T11], x12: => Parsley[T12], x13: => Parsley[T13], x14: => Parsley[T14], x15: => Parsley[T15], x16: => Parsley[T16], x17: => Parsley[T17], x18: => Parsley[T18], x19: => Parsley[T19], x20: => Parsley[T20], x21: => Parsley[T21]): Parsley[R]

    The template method: this is the method that can be used to sequence and combine the results of all the parsers.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. final def con: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) => R

    The abstract hook method: what value is the singleton representing?

    The abstract hook method: what value is the singleton representing?

    Definition Classes
    ParserBridge21ParserSingletonBridge
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  12. final def from(op: Parsley[_]): Parsley[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) => R]

    The combinator on this implementing type that performs the parser and returns con.

    The combinator on this implementing type that performs the parser and returns con.

    op

    the parser that should be parsed before returning con.

    Definition Classes
    ParserSingletonBridge
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from ParserSingletonBridge[(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21) => R]

Inherited from AnyRef

Inherited from Any

Ungrouped