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
  • package token
    Definition Classes
    parsley
  • BitGen
  • Char
  • CharSet
  • Combinator
  • ExpressionParser
  • Failure
  • Impl
  • Implicits
  • LanguageDef
  • NotRequired
  • Parser
  • Parsley
  • Predicate
  • Reg
  • Result
  • Success
  • TokenParser
  • character
  • combinator
  • debug
  • implicits
  • lift
  • registers
  • unsafe

object ExpressionParser

Annotations
@deprecated
Deprecated

(Since version v2.2.0) This object will be removed in Parsley 3.0, use parsley.expr.precedence instead

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

Type Members

  1. implicit class LevelBuilder[B, +C] extends AnyRef
  2. type MonoOps[A] = expr.Ops[A, A]

Deprecated Type Members

  1. sealed trait Assoc extends AnyRef

    Denotes the associativity of an operator, either AssocLeft or AssocRight.

    Denotes the associativity of an operator, either AssocLeft or AssocRight.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This class will be removed in Parsley 3.0, see Infixes for how this is replaced in new-style

  2. sealed trait Fixity extends AnyRef

    Denotes the fixity of an operator, either Prefix or Postfix.

    Denotes the fixity of an operator, either Prefix or Postfix.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This class will be removed in Parsley 3.0, see Unaries for how this is replaced in new-style

  3. type Levels[-A, +B] = expr.Levels[A, B]

    For more complex expression parser types Levels can be used to describe the precedence table whilst preserving the intermediate structure between each level.

    For more complex expression parser types Levels can be used to describe the precedence table whilst preserving the intermediate structure between each level.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This type will be removed in Parsley 3.0, use parsley.expr.Levels instead

  4. type Ops[-A, B] = expr.Ops[A, B]

    A list of operators on the same precedence level.

    A list of operators on the same precedence level. Note operators of different fixities cannot mix on the same level of indentation. Either Lefts which is a list of infix left-assocative operators, Rights which is a list of infix right-associative operators, Prefixes which is a list of prefixing unary operators or Postfixes a list of postfixing unary operators.

    Each list of operators will also require a wrapping function of type A => B. This allows it to convert values of type A into values of type B when there is no more operation to perform.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This type will be removed in Parsley 3.0, use parsley.expr.Ops instead

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

Deprecated Value Members

  1. def apply[A, B](atom: => Parsley[A], table: Levels[A, B]): ExpressionParser[A, 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

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This class will be removed in Parsley 3.0, use parsley.expr.precedence instead

  2. def apply[A](atom: => Parsley[A], table: MonoOps[A]*): ExpressionParser[A, 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

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This class will be removed in Parsley 3.0, use parsley.expr.precedence instead

  3. case object AssocLeft extends Assoc with Product with Serializable
    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This class will be removed in Parsley 3.0, see Infixes for how this is replaced in new-style

  4. case object AssocRight extends Assoc with Product with Serializable
    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This class will be removed in Parsley 3.0, see Infixes for how this is replaced in new-style

  5. object Lefts
    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This will be removed in Parsley 3.0, use parsley.expr.GOps instead

  6. object Level

    This represents a single new level of the hierarchy, with stronger precedence than its tail.

    This represents a single new level of the hierarchy, with stronger precedence than its tail.

    returns

    A larger precedence table transforming atoms of type A into a structure of type C.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This class will be removed in Parsley 3.0, use parsley.expr.Level instead

  7. case object Postfix extends Fixity with Product with Serializable
    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This class will be removed in Parsley 3.0, see Unaries for how this is replaced in new-style

  8. object Postfixes
    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This will be removed in Parsley 3.0, use parsley.expr.GOps instead

  9. case object Prefix extends Fixity with Product with Serializable
    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This class will be removed in Parsley 3.0, see Unaries for how this is replaced in new-style

  10. object Prefixes
    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This will be removed in Parsley 3.0, use parsley.expr.GOps instead

  11. object Rights
    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This will be removed in Parsley 3.0, use parsley.expr.GOps instead

Inherited from AnyRef

Inherited from Any

Ungrouped