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, as well as the implicit classes which enable the "method-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.implicits contains several implicits to add syntactic sugar to the combinators, such as being able to use character and string literals directly as parsers, as well as enabling lifting of functions to work on parsers.
    • 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.registers contains combinators that interact with the context-sensitive functionality in the form of registers.
    • parsley.token contains the Lexer class that provides a host of helpful lexing combinators when provided with the description of a language.
    • parsley.unsafe contains unsafe (and not thread-safe) ways of speeding up the execution of a parser.

    In addition to the modules and packages outlined above, this version of Parsley (up to version 3.0), also includes the so-called old-style API, which is deprecated (see the Parsley wiki for a discussion of these differences). You should use the modules described above, and avoid the following:

    • parsley.BitGen
    • parsley.Char
    • parsley.CharSet
    • parsley.Combinator
    • parsley.ExpressionParser
    • parsley.Impl
    • parsley.Implicits
    • parsley.LanguageDef
    • parsley.NotRequired
    • parsley.Parser
    • parsley.Predicate
    • parsley.Reg
    • parsley.TokenParser
    Definition Classes
    root
  • package parsley
    Definition Classes
    root
  • package expr
    Definition Classes
    parsley
  • Fixity
  • GOps
  • InfixL
  • InfixR
  • Level
  • Levels
  • Ops
  • Postfix
  • Prefix
  • chain
  • precedence
o

parsley.expr

precedence

object precedence

This object is used to construct precedence parsers from either a Levels or many Ops[A, A].

Since

2.2.0

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. precedence
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[A, B](atom: => Parsley[A], table: Levels[A, B]): Parsley[B]

    This is used to build an expression parser for a multi-layered expression tree type.

    This is used to build an expression parser for a multi-layered expression tree type. Levels are specified from strongest to weakest.

    A

    The type of the atomic unit of the expression

    B

    The type of the resulting parse tree (outermost operations)

    atom

    The atomic unit of the expression

    table

    A table of operators. Table is ordered highest precedence to lowest precedence. See Levels and it's subtypes for a description of how the types work.

    returns

    A parser for the described expression language

    Since

    2.2.0

  5. def apply[A](atom: => Parsley[A], table: Ops[A, A]*): Parsley[A]

    This is used to build an expression parser for a monolithic type.

    This is used to build an expression parser for a monolithic type. Levels are specified from strongest to weakest.

    A

    The type of the monolithic tree

    atom

    The atomic unit of the expression, for instance numbers/variables

    table

    A table of operators. Table is ordered highest precedence to lowest precedence. Each list in the table corresponds to operators of the same precedence level.

    returns

    A parser for the described expression language

    Since

    2.2.0

  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 eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped