Packages

  • package root
    Definition Classes
    root
  • package parsley
    Definition Classes
    root
  • package token

    This package provides a wealth of functionality for performing common lexing tasks.

    This package provides a wealth of functionality for performing common lexing tasks.

    It is organised as follows:

    • the main parsing functionality is accessed via Lexer, which provides implementations for the combinators found in the sub-packages given a LexicalDesc.
    • the descriptions sub-package is how a lexical structure can be described, providing the configuration that alters the behaviour of the parsers produced by the Lexer.
    • the other sub-packages contain the high-level interfaces that the Lexer exposes, which can be used to pass whitespace-aware and non-whitespace-aware combinators around in a uniform way.
    • the predicate module contains functionality to help define boolean predicates on characters or unicode codepoints.
    Definition Classes
    parsley
  • package symbol

    This package contains the abstract parsers for parsing symbolic tokens like keywords.

    This package contains the abstract parsers for parsing symbolic tokens like keywords.

    Definition Classes
    token
    Since

    4.0.0

  • ImplicitSymbol
  • Symbol

abstract class Symbol extends AnyRef

This class defines a uniform interface for defining parsers for basic symbols, independent of how whitespace should be handled after the symbol.

Source
Symbol.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Symbol
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(name: Char): Parsley[Unit]

    This combinator parses a given character as a symbol.

    This combinator parses a given character as a symbol.

    There is no special treatment of the given character as a keyword or operator. The result of the parser is ignored by returning Unit.

    name

    the symbol to parse.

    Since

    4.0.0

  2. abstract def apply(name: String): Parsley[Unit]

    This combinator parses a given string as a symbol and accounts for the possiblility that it is a defined hard keyword or operator.

    This combinator parses a given string as a symbol and accounts for the possiblility that it is a defined hard keyword or operator.

    A string is treated as a symbol by parsing it atomically (with attempt) as well as ensuring that if it is a known special symbol, like a keyword, that it is given the correct treatment. For keywords and operators, this means that the given string will only parse if it does not otherwise form a valid prefix of a larger legal identifier or operator.

    name

    the symbol to parse.

    Since

    4.0.0

  3. abstract def softKeyword(name: String): Parsley[Unit]

    This combinator parses a given soft keyword atomically: the keyword is only valid if it is not followed directly by a character which would make it a larger valid identifier.

    This combinator parses a given soft keyword atomically: the keyword is only valid if it is not followed directly by a character which would make it a larger valid identifier.

    Soft keywords are keywords that are only reserved within certain contexts. The apply(String) combinator handles so-called hard keywords automatically, as the given string is checked to see what class of symbol it might belong to. However, soft keywords are not included in this set, as they are not always reserved in all situations. As such, when a soft keyword does need to be parsed, this combinator should be used to do it explicitly. Care should be taken to ensure that soft keywords take parsing priority over identifiers when they do occur.

    Since

    4.0.0

  4. abstract def softOperator(name: String): Parsley[Unit]

    This combinator parses a given soft operator atomically: the operator is only valid if it is not followed directly by a character which would make it a larger valid operator (reserved or otherwise).

    This combinator parses a given soft operator atomically: the operator is only valid if it is not followed directly by a character which would make it a larger valid operator (reserved or otherwise).

    Soft operators are operators that are only reserved within certain contexts. The apply(String) combinator handles so-called hard operators automatically, as the given string is checked to see what class of symbol it might belong to. However, soft operators are not included in this set, as they are not always reserved in all situations. As such, when a soft operator does need to be parsed, this combinator should be used to do it explicitly.

    Since

    4.0.0

Concrete 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 apply(name: Char, label: String): Parsley[Unit]

    This combinator parses a given character as a symbol.

    This combinator parses a given character as a symbol.

    There is no special treatment of the given character as a keyword or operator. The result of the parser is ignored by returning Unit.

    Additionally applies the given label as the name of the symbol.

    name

    the symbol to parse.

    label

    the name to give to the symbol in error messages.

    Since

    4.0.0

  5. final def apply(name: String, label: String): Parsley[Unit]

    This combinator parses a given string as a symbol and accounts for the possiblility that it is a defined hard keyword or operator.

    This combinator parses a given string as a symbol and accounts for the possiblility that it is a defined hard keyword or operator.

    A string is treated as a symbol by parsing it atomically (with attempt) as well as ensuring that if it is a known special symbol, like a keyword, that it is given the correct treatment. For keywords and operators, this means that the given string will only parse if it does not otherwise form a valid prefix of a larger legal identifier or operator.

    Additionally applies the given label as the name of the symbol.

    name

    the symbol to parse.

    label

    the name to give to the symbol in error messages.

    Since

    4.0.0

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. final lazy val closingAngle: Parsley[Unit]

    This parser parses a closing square bracket > as a symbol.

    This parser parses a closing square bracket > as a symbol.

    Since

    4.0.0

  9. final lazy val closingBrace: Parsley[Unit]

    This parser parses a closing brace } as a symbol.

    This parser parses a closing brace } as a symbol.

    Since

    4.0.0

  10. final lazy val closingParen: Parsley[Unit]

    This parser parses a closing parenthesis ) as a symbol.

    This parser parses a closing parenthesis ) as a symbol.

    Since

    4.0.0

  11. final lazy val closingSquare: Parsley[Unit]

    This parser parses a closing square bracket ] as a symbol.

    This parser parses a closing square bracket ] as a symbol.

    Since

    4.0.0

  12. final lazy val colon: Parsley[Unit]

    This parser parses a colon : as a symbol.

    This parser parses a colon : as a symbol.

    Since

    4.0.0

  13. final lazy val comma: Parsley[Unit]

    This parser parses a comma , as a symbol.

    This parser parses a comma , as a symbol.

    Since

    4.0.0

  14. final lazy val dot: Parsley[Unit]

    This parser parses a dot . as a symbol.

    This parser parses a dot . as a symbol.

    Since

    4.0.0

  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. final val implicits: ImplicitSymbol

    This object can be imported from to expose a way of converting raw Scala string literals into a parser for that specific token.

    This object can be imported from to expose a way of converting raw Scala string literals into a parser for that specific token.

    Since

    4.0.0

  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final lazy val openAngle: Parsley[Unit]

    This parser parses an open angle bracket < as a symbol.

    This parser parses an open angle bracket < as a symbol.

    Since

    4.0.0

  26. final lazy val openBrace: Parsley[Unit]

    This parser parses an open brace { as a symbol.

    This parser parses an open brace { as a symbol.

    Since

    4.0.0

  27. final lazy val openParen: Parsley[Unit]

    This parser parses an open parenthesis ( as a symbol.

    This parser parses an open parenthesis ( as a symbol.

    Since

    4.0.0

  28. final lazy val openSquare: Parsley[Unit]

    This parser parses an open square bracket [ as a symbol.

    This parser parses an open square bracket [ as a symbol.

    Since

    4.0.0

  29. final lazy val semi: Parsley[Unit]

    This parser parses a semicolon ; as a symbol.

    This parser parses a semicolon ; as a symbol.

    Since

    4.0.0

  30. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  31. def toString(): String
    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped