parsley.expr
Members list
Fixities
Denotes the fixity and associativity of an operator.
Denotes the fixity and associativity of an operator. Importantly, it also specifies the type of the of the operations themselves.
Attributes
- Since:
4.0.0
- Source:
- Fixity.scala
- Graph
- Supertypes
- Known subtypes
Describes left-associative binary operators
Describes left-associative binary operators
Attributes
- Since:
4.0.0
- Source:
- Fixity.scala
- Graph
- Supertypes
- trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait Fixityclass Objecttrait Matchableclass Any
- Self type
- InfixL.type
Describes non-associative operators
Describes non-associative operators
Attributes
- Since:
4.0.0
- Source:
- Fixity.scala
- Graph
- Supertypes
- trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait Fixityclass Objecttrait Matchableclass Any
- Self type
- InfixN.type
Describes right-associative binary operators
Describes right-associative binary operators
Attributes
- Since:
4.0.0
- Source:
- Fixity.scala
- Graph
- Supertypes
- trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait Fixityclass Objecttrait Matchableclass Any
- Self type
- InfixR.type
Describes unary postfix operators
Describes unary postfix operators
Attributes
- Since:
4.0.0
- Source:
- Fixity.scala
- Graph
- Supertypes
- trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait Fixityclass Objecttrait Matchableclass Any
- Self type
- Postfix.type
Describes unary prefix operators
Describes unary prefix operators
Attributes
- Since:
4.0.0
- Source:
- Fixity.scala
- Graph
- Supertypes
- trait Singletontrait Producttrait Mirrortrait Serializabletrait Producttrait Equalstrait Fixityclass Objecttrait Matchableclass Any
- Self type
- Prefix.type
Table
This class is the base of a precedence table.
This class is the base of a precedence table.
Forms the base of a precedence table, requiring at least one atom to be provided. This first atom will be parsed first.
Attributes
- A
the type of the atoms.
- atom0
the first atom found at the root of the precedence table.
- atoms
any remaining atoms found at the root of the precedence table.
- Since:
4.0.0
- Source:
- Levels.scala
- Graph
- Supertypes
This class allows for the description of a single layer of operators in the precedence tree.
This class allows for the description of a single layer of operators in the precedence tree.
Describes the operators at a specific level in the precedence tree, such that these ops
consume B
s, possibly A
s and produce B
s: this depends on the Fixity of the operators.
Attributes
This class is the base type for precedence tables.
This class is the base type for precedence tables.
For more complex expression parser types Prec
can be used to
describe the precedence table whilst preserving the intermediate
structure between each level.
The base of the table will always be an Atoms
, and each layer
built on top of the last using either the :+
or +:
methods.
Attributes
- A
the type of structure produced by the list of levels.
- Since:
4.0.0
- Source:
- Levels.scala
- Graph
- Supertypes
- Known subtypes
- class Atoms[A]
Builders
This helper object builds values of Ops[A, B]
, for fully heterogeneous precedence parsing.
This helper object builds values of Ops[A, B]
, for fully heterogeneous precedence parsing.
Attributes
- Since:
2.2.0
- Source:
- SmartOps.scala
- Graph
- Supertypes
- Self type
- GOps.type
This helper object is used to build values of Ops[A, A]
, for homogeneous precedence parsing.
This helper object builds values of Ops[A, B]
where A <: B
, for subtyped heterogeneous precedence parsing.
This helper object builds values of Ops[A, B]
where A <: B
, for subtyped heterogeneous precedence parsing.
Attributes
- Since:
3.0.0
- Source:
- SmartOps.scala
- Graph
- Supertypes
- Self type
- SOps.type
Chains
This module contains the very useful chaining family of combinators, which are mostly used to parse operators and expressions of varying fixities.
This module contains the very useful chaining family of combinators, which are mostly used to parse operators and expressions of varying fixities. It is a more low-level API compared with precedence.
Attributes
- Since:
2.2.0
- Source:
- chain.scala
- Graph
- Supertypes
- Self type
- chain.type
This module contains the very useful chaining family of combinators, which are mostly used to parse operators and expressions of varying fixities.
This module contains the very useful chaining family of combinators, which are mostly used to parse operators and expressions of varying fixities. It is a more low-level API compared with precedence.
Compared with the combinators in chain, these allow for more freedom in the type of the values and the operators.
Attributes
- Since:
4.0.0
- Source:
- infix.scala
- Graph
- Supertypes
- Self type
- infix.type
This module contains specialist combinators for mixing unary and binary operators on the same level.
This module contains specialist combinators for mixing unary and binary operators on the same level. This is only sensible when mixing infix-left and postfix or infix-right and prefix.
Attributes
- Since:
4.0.0
- Note:
the behaviour of the enclosed combinators may be counter intuitive: they should not be used unless you know what you are doing.
- Source:
- mixed.scala
- Graph
- Supertypes
- Self type
- mixed.type
Precedence
This object is used to construct precedence parsers from either a Prec
or many Ops[A, A]
.
This object is used to construct precedence parsers from either a Prec
or many Ops[A, A]
.
Contained within this object are three different shapes of apply
functions: they allows for
the construction of a precedence parser from either: a collection of levels of operators and atoms,
in either weak-to-strong or strong-to-weak orderings; or a heterogeneous precedence table Prec
.
Attributes
- Since:
2.2.0
- Source:
- precedence.scala
- Graph
- Supertypes
- Self type
- precedence.type