parsley.token.descriptions

Members list

Type members

Classlikes

sealed abstract class BreakCharDesc

This class, and its subtypes, describe how break characters are supported within literals.

This class, and its subtypes, describe how break characters are supported within literals.

Attributes

Since

4.0.0

Companion
object
Source
NumericDesc.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object NoBreakChar
class Supported
object BreakCharDesc

This object contains the concrete subtypes of BreakCharDesc.

This object contains the concrete subtypes of BreakCharDesc.

Attributes

Since

4.0.0

Companion
class
Source
NumericDesc.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class EscapeDesc(escBegin: Char, literals: Set[Char], mapping: Map[String, Int], decimalEscape: NumericEscape, hexadecimalEscape: NumericEscape, octalEscape: NumericEscape, binaryEscape: NumericEscape, emptyEscape: Option[Char], gapsSupported: Boolean)

This class describes the valid escape sequences within character and string literals.

This class describes the valid escape sequences within character and string literals.

This allows for the definition of different escape sequences as direct literals, mapping from single or multiple characters to specific values, numeric escape sequences with different bases, as well as supporting zero-width escapes and line continuations via string gaps.

Value parameters

binaryEscape

$numericEscape 2.

decimalEscape

$numericEscape 10.

emptyEscape

if one should exist, the character which has no effect on the string but can be used to disambiguate other escape sequences: in Haskell this would be \&.

escBegin

the character that starts an escape sequence, very often this is '\\'.

gapsSupported

specifies whether or not string gaps are supported: this is where whitespace can be injected between two escBegin characters and this will all be ignored in the final string, such that "hello \ \world" is "hello world".

hexadecimalEscape

$numericEscape 16.

literals

the characters that can be directly escaped, but still represent themselves, for instance '"', or '\\'.

mapping

the possible escape sequences that map to a character other than themselves and the (full UTF-16) character they map to, for instance "n" -> 0xa.

octalEscape

$numericEscape 8.

Attributes

Companion
object
Source
TextDesc.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object EscapeDesc

This object contains default implementations of the EscapeDesc class, which align with different languages or styles.

This object contains default implementations of the EscapeDesc class, which align with different languages or styles.

Attributes

Since

4.0.0

Companion
class
Source
TextDesc.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
EscapeDesc.type
sealed abstract class ExponentDesc

This class, and its subtypes, describe how scientific exponent notation can be used within real literals.

This class, and its subtypes, describe how scientific exponent notation can be used within real literals.

Attributes

Since

4.0.0

Companion
object
Source
NumericDesc.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object NoExponents
class Supported
object ExponentDesc

This object contains the concrete subtypes of ExponentDesc.

This object contains the concrete subtypes of ExponentDesc.

Attributes

Since

4.0.0

Companion
class
Source
NumericDesc.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final class LexicalDesc

This class describes the aggregation of a bunch of different sub-configurations for lexing a specific language.

This class describes the aggregation of a bunch of different sub-configurations for lexing a specific language.

Value parameters

nameDesc

the description of name-like lexemes

numericDesc

the description of numeric literals

spaceDesc

the description of whitespace

symbolDesc

the description of specific symbolic lexemes

textDesc

the description of text literals

Attributes

Since

4.0.0

Note

Documentation for the parameters is found in the copy or companion apply.

Companion
object
Source
LexicalDesc.scala
Supertypes
class Object
trait Matchable
class Any
object LexicalDesc

This object contains any preconfigured lexical definitions and a way of constructing a complete description.

This object contains any preconfigured lexical definitions and a way of constructing a complete description.

Attributes

Since

4.0.0

Companion
class
Source
LexicalDesc.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final case class NameDesc(identifierStart: CharPred, identifierLetter: CharPred, operatorStart: CharPred, operatorLetter: CharPred)

The class describes how name-like things are described lexically.

The class describes how name-like things are described lexically.

Value parameters

identifierLetter

what characters may continue an identifier?

identifierStart

what characters may start an identifier?

operatorLetter

what characters may continue a user-defined operator?

operatorStart

what characters may start a user-defined operator?

Attributes

Since

4.0.0

Companion
object
Source
NameDesc.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object NameDesc

This object contains any preconfigured name definitions.

This object contains any preconfigured name definitions.

Attributes

Since

4.0.0

Companion
class
Source
NameDesc.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
NameDesc.type
sealed abstract class NumberOfDigits

This class, and its subtypes, describe how many digits a numeric escape sequence is allowed.

This class, and its subtypes, describe how many digits a numeric escape sequence is allowed.

Attributes

Since

4.0.0

Companion
object
Source
TextDesc.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AtMost
class Exactly
object Unbounded

This object contains the concrete subtypes of NumberOfDigits.

This object contains the concrete subtypes of NumberOfDigits.

Attributes

Since

4.0.0

Companion
class
Source
TextDesc.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class NumericDesc(literalBreakChar: BreakCharDesc, leadingDotAllowed: Boolean, trailingDotAllowed: Boolean, leadingZerosAllowed: Boolean, positiveSign: PlusSignPresence, integerNumbersCanBeHexadecimal: Boolean, integerNumbersCanBeOctal: Boolean, integerNumbersCanBeBinary: Boolean, realNumbersCanBeHexadecimal: Boolean, realNumbersCanBeOctal: Boolean, realNumbersCanBeBinary: Boolean, hexadecimalLeads: Set[Char], octalLeads: Set[Char], binaryLeads: Set[Char], decimalExponentDesc: ExponentDesc, hexadecimalExponentDesc: ExponentDesc, octalExponentDesc: ExponentDesc, binaryExponentDesc: ExponentDesc)

This class describes how numeric literals, in different bases, should be processed lexically.

This class describes how numeric literals, in different bases, should be processed lexically.

Value parameters

binaryExponentDesc

$genericExp binary literals.

binaryLeads

what characters begin a binary literal following a 0 (may be empty).

decimalExponentDesc

$genericExp decimal literals.

hexadecimalExponentDesc

$genericExp hexadecimal literals.

hexadecimalLeads

what characters begin a hexadecimal literal following a 0 (may be empty).

integerNumbersCanBeBinary

$genericInt binary?

integerNumbersCanBeHexadecimal

$genericInt hexadecimal?

integerNumbersCanBeOctal

$genericInt octal?

leadingDotAllowed

can a real number omit a leading 0 before the point?

leadingZerosAllowed

are extraneous zeros allowed at the start of decimal numbers?

literalBreakChar

describes if breaks can be found within numeric literals.

octalExponentDesc

$genericExp octal literals.

octalLeads

what characters begin an octal literal following a 0 (may be empty).

positiveSign

describes if positive (+) signs are allowed, compulsory, or illegal.

realNumbersCanBeBinary

$genericReal binary?

realNumbersCanBeHexadecimal

$genericReal hexadecimal?

realNumbersCanBeOctal

$genericReal octal?

trailingDotAllowed

can a real number omit a trailing 0 after the point?

Attributes

Since

4.0.0

Companion
object
Source
NumericDesc.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object NumericDesc

This object contains any preconfigured text definitions.

This object contains any preconfigured text definitions.

Attributes

Since

4.0.0

Companion
class
Source
NumericDesc.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed abstract class NumericEscape

This class, and its subtypes, describe how numeric escape sequences should work for a specific base.

This class, and its subtypes, describe how numeric escape sequences should work for a specific base.

Attributes

Since

4.0.0

Companion
object
Source
TextDesc.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Illegal
class Supported
object NumericEscape

This object contains the concrete subtypes of NumericEscape.

This object contains the concrete subtypes of NumericEscape.

Attributes

Since

4.0.0

Companion
class
Source
TextDesc.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed abstract class PlusSignPresence

This class, and its subtypes, describe whether or not the plus sign (+) is allowed in a specific position.

This class, and its subtypes, describe whether or not the plus sign (+) is allowed in a specific position.

Attributes

Since

4.0.0

Companion
object
Source
NumericDesc.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Illegal
object Optional
object Required

This object contains the concrete subtypes for PlusSignPresence.

This object contains the concrete subtypes for PlusSignPresence.

Attributes

Since

4.0.0

Companion
class
Source
NumericDesc.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class SpaceDesc(lineCommentStart: String, lineCommentAllowsEOF: Boolean, multiLineCommentStart: String, multiLineCommentEnd: String, multiLineNestedComments: Boolean, space: CharPred, whitespaceIsContextDependent: Boolean)

This class describes how whitespace should be handled lexically.

This class describes how whitespace should be handled lexically.

Value parameters

lineCommentAllowsEOF

can a single-line comment be terminated by the end-of-file, or must it ends with a newline

lineCommentStart

how do single-line comments start? (empty for no single-line comments)

multiLineCommentEnd

how do multi-line comments end? (empty for no multi-line comments)

multiLineCommentStart

how do multi-line comments start? (empty for no multi-line comments)

multiLineNestedComments

can multi-line comments be nested within each other?

space

what characters serve as whitespace within the language?

whitespaceIsContextDependent

can the definition of whitespace change depending on context? (in Python, say, newlines are valid whitespace within parentheses, but are significant outside of them)

Attributes

Since

4.0.0

Companion
object
Source
SpaceDesc.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object SpaceDesc

This object contains any default configurations describing whitespace.

This object contains any default configurations describing whitespace.

Attributes

Since

4.0.0

Companion
class
Source
SpaceDesc.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
SpaceDesc.type
final case class SymbolDesc(hardKeywords: Set[String], hardOperators: Set[String], caseSensitive: Boolean)

This class describes how symbols (textual literals in a BNF) should be processed lexically.

This class describes how symbols (textual literals in a BNF) should be processed lexically.

Value parameters

caseSensitive

are the keywords case sensitive: when false, IF == if.

hardKeywords

what keywords are always treated as keywords within the language.

hardOperators

what operators are always treated as reserved operators within the language.

Attributes

Since

4.0.0

Companion
object
Source
SymbolDesc.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object SymbolDesc

This object contains any preconfigured symbol descriptions.

This object contains any preconfigured symbol descriptions.

Attributes

Since

4.0.0

Companion
class
Source
SymbolDesc.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
SymbolDesc.type
final case class TextDesc(escapeSequences: EscapeDesc, characterLiteralEnd: Char, stringEnds: Set[(String, String)], multiStringEnds: Set[(String, String)], graphicCharacter: CharPred)

This class describes how textual literals like strings and characters should be processed lexically.

This class describes how textual literals like strings and characters should be processed lexically.

Value parameters

characterLiteralEnd

what character starts and ends a character literal.

escapeSequences

the description of how escape sequences in literals.

graphicCharacter

what characters can be written verbatim into a character or string literal.

multiStringEnds

what sequences may begin and end a multi-line string literal.

stringEnds

what sequences may begin and end a string literal.

Attributes

Since

4.0.0

Companion
object
Source
TextDesc.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TextDesc

This object contains any preconfigured text definitions.

This object contains any preconfigured text definitions.

Attributes

Since

4.0.0

Companion
class
Source
TextDesc.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
TextDesc.type