parsley.token.descriptions

Members list

Concise view

Type members

Classlikes

final case class LexicalDesc(nameDesc: NameDesc, symbolDesc: SymbolDesc, numericDesc: NumericDesc, textDesc: TextDesc, spaceDesc: SpaceDesc)

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.

Attributes

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

Since:

4.0.0

Companion:
object
Source:
LexicalDesc.scala
Graph
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any

This object contains any preconfigured lexical definitions.

This object contains any preconfigured lexical definitions.

Attributes

Since:

4.0.0

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

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

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

Attributes

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?

Since:

4.0.0

Companion:
object
Source:
NameDesc.scala
Graph
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any
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
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class SpaceDesc(commentStart: String, commentEnd: String, commentLine: String, commentLineAllowsEOF: Boolean, nestedComments: Boolean, space: CharPredicate, whitespaceIsContextDependent: Boolean)

This class describes how whitespace should be handled lexically.

This class describes how whitespace should be handled lexically.

Attributes

commentEnd

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

commentLine

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

commentLineAllowsEOF

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

commentStart

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

nestedComments

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)

Since:

4.0.0

Companion:
object
Source:
SpaceDesc.scala
Graph
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any
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
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self 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.

Attributes

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.

Since:

4.0.0

Companion:
object
Source:
SymbolDesc.scala
Graph
Supertypes
trait Product
trait Equals
class Object
trait Matchable
class Any
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
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type