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 Char

Annotations
@deprecated
Deprecated

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

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Char
  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. 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()

Deprecated Value Members

  1. val alphaNum: Parsley[Char]

    Parses a letter or digit.

    Parses a letter or digit. Returns the parsed character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.alphaNum instead

  2. val anyChar: Parsley[Char]

    The parser anyChar accepts any kind of character.

    The parser anyChar accepts any kind of character. Returns the accepted character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.anyChar instead

  3. def char(c: Char): Parsley[Char]

    Reads a character from the input stream and returns it, else fails if the character is not found at the head of the stream.

    Reads a character from the input stream and returns it, else fails if the character is not found at the head of the stream.

    c

    The character to search for

    returns

    c if it can be found at the head of the input

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.char instead

  4. val crlf: Parsley[Char]

    Parses a carriage return character '\r' followed by a newline character '\n', returns the newline character.

    Parses a carriage return character '\r' followed by a newline character '\n', returns the newline character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.crlf instead

  5. val digit: Parsley[Char]

    Parses a digit.

    Parses a digit. Returns the parsed character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.digit instead

  6. val endOfLine: Parsley[Char]

    Parses a CRLF or LF end-of-line.

    Parses a CRLF or LF end-of-line. Returns a newline character ('\n').

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.endOfLine instead

  7. val hexDigit: Parsley[Char]

    Parses a hexadecimal digit.

    Parses a hexadecimal digit. Returns the parsed character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.hexDigit instead

  8. def isHexDigit(c: Char): Boolean

    Helper function, equivalent to the predicate used by hexDigit.

    Helper function, equivalent to the predicate used by hexDigit. Useful for providing to LanguageDef

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.isHexDigit instead

  9. def isOctDigit(c: Char): Boolean

    Helper function, equivalent to the predicate used by octDigit.

    Helper function, equivalent to the predicate used by octDigit. Useful for providing to LanguageDef

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.isOctDigit instead

  10. def isSpace(c: Char): Boolean

    Helper function, equivalent to the predicate used by space.

    Helper function, equivalent to the predicate used by space. Useful for providing to LanguageDef

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.isSpace instead

  11. def isWhitespace(c: Char): Boolean

    Helper function, equivalent to the predicate used by whitespace.

    Helper function, equivalent to the predicate used by whitespace. Useful for providing to LanguageDef

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.isWhitespace instead

  12. val letter: Parsley[Char]

    Parses a letter.

    Parses a letter. Returns the parsed character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.letter instead

  13. val lower: Parsley[Char]

    Parses a lower case letter.

    Parses a lower case letter. Returns the parsed character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.lower instead

  14. val newline: Parsley[Char]

    Parses a newline character ('\n').

    Parses a newline character ('\n'). Returns a newline character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.newline instead

  15. def noneOf(cs: Char*): Parsley[Char]

    As the dual of oneOf, noneOf(cs) succeeds if the current character is not in the supplied sequence of characters cs.

    As the dual of oneOf, noneOf(cs) succeeds if the current character is not in the supplied sequence of characters cs. Returns the parsed character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.noneOf instead

  16. def noneOf(cs: Set[Char]): Parsley[Char]

    As the dual of oneOf, noneOf(cs) succeeds if the current character is not in the supplied set of characters cs.

    As the dual of oneOf, noneOf(cs) succeeds if the current character is not in the supplied set of characters cs. Returns the parsed character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.noneOf instead

  17. val octDigit: Parsley[Char]

    Parses an octal digit.

    Parses an octal digit. Returns the parsed character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.octDigit instead

  18. def oneOf(cs: Char*): Parsley[Char]

    oneOf(cs) succeeds if the current character is in the supplied sequence of characters cs.

    oneOf(cs) succeeds if the current character is in the supplied sequence of characters cs. Returns the parsed character. See also satisfy.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.oneOf instead

  19. def oneOf(cs: Set[Char]): Parsley[Char]

    oneOf(cs) succeeds if the current character is in the supplied set of characters cs.

    oneOf(cs) succeeds if the current character is in the supplied set of characters cs. Returns the parsed character. See also satisfy.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.oneOf instead

  20. def satisfy(f: (Char) => Boolean): Parsley[Char]

    Reads a character from the head of the input stream if and only if it satisfies the given predicate.

    Reads a character from the head of the input stream if and only if it satisfies the given predicate. Else it fails without consuming the character.

    f

    The function to test the character on

    returns

    c if f(c) is true.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.satisfy instead

  21. val space: Parsley[Char]

    Parses a whitespace character (either ' ' or '\t').

    Parses a whitespace character (either ' ' or '\t'). Returns the parsed character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.space instead

  22. val spaces: Parsley[Unit]

    Skips zero or more whitespace characters.

    Skips zero or more whitespace characters. See also skipMany. Uses space.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.spaces instead

  23. def string(s: String): Parsley[String]

    Reads a string from the input stream and returns it, else fails if the string is not found at the head of the stream.

    Reads a string from the input stream and returns it, else fails if the string is not found at the head of the stream.

    s

    The string to match against

    returns

    s if it can be found at the head of the input

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.string instead

  24. val tab: Parsley[Char]

    Parses a tab character ('\t').

    Parses a tab character ('\t'). Returns a tab character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.tab instead

  25. val upper: Parsley[Char]

    Parses an upper case letter.

    Parses an upper case letter. Returns the parsed character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.upper instead

  26. val whitespace: Parsley[Char]

    Parses a whitespace character (' ', '\t', '\n', '\r', '\f', '\v').

    Parses a whitespace character (' ', '\t', '\n', '\r', '\f', '\v'). Returns the parsed character.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.whitespace instead

  27. val whitespaces: Parsley[Unit]

    Skips zero or more whitespace characters.

    Skips zero or more whitespace characters. See also skipMany. Uses whitespace.

    Annotations
    @deprecated
    Deprecated

    (Since version v2.2.0) This method will be removed in Parsley 3.0, use parsley.character.whitespaces instead

Inherited from AnyRef

Inherited from Any

Ungrouped