parsley.expr
Type members
Classlikes
This represents the final level of the hierarchy, with the strongest binding.
This represents the final level of the hierarchy, with the strongest binding.
Denotes the fixity and associativity of an operator. Importantly, it also specifies the type of the
of the operations themselves. For non-monolithic structures this is described by fixity.GOp
, subtyped
structures fixity.SOp
, and for monolithic structures fixity.Op
.
Denotes the fixity and associativity of an operator. Importantly, it also specifies the type of the
of the operations themselves. For non-monolithic structures this is described by fixity.GOp
, subtyped
structures fixity.SOp
, and for monolithic structures fixity.Op
.
- Since
2.2.0
Helper object to build values of Ops[A, B]
, for generalised precedence parsing
Helper object to build values of Ops[A, B]
, for generalised precedence parsing
- Since
2.2.0
Describes right-associative binary operators
Describes right-associative binary operators
- Since
2.2.0
This represents a single new level of the hierarchy, with stronger precedence than its tail.
This represents a single new level of the hierarchy, with stronger precedence than its tail.
- Type Params
- A
The base type accepted by the layer below
- B
The intermediate type produced by the layer below to be fed into this level
- C
The type of structure produced by this layer
- Value Params
- lvls
The next, stronger, levels in the precedence table
- ops
The operators accepted at this level
- Returns
A larger precedence table transforming atoms of type
A
into a structure of typeC
.- Since
3.0.0
For more complex expression parser types Levels
can be used to
describe the precedence table whilst preserving the intermediate
structure between each level.
For more complex expression parser types Levels
can be used to
describe the precedence table whilst preserving the intermediate
structure between each level.
- Type Params
- A
The base type accepted by this list of levels
- B
The type of structure produced by the list of levels
- Since
3.0.0
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.
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.
- Type Params
- A
The base type consumed by the operators
- B
The type produced/consumed by the operators
- Since
2.2.0
- Note
For less complex types
Ops[A, A]
is sufficient- Companion
- object
Helper object to build values of Ops[A, A]
, for monolithic precedence parsing
Helper object to build values of Ops[A, A]
, for monolithic precedence parsing
- Since
2.2.0
- Companion
- class
Helper object to build values of Ops[A, B]
, for precedence parsing with subtyped data-structures.
Helper object to build values of Ops[A, B]
, for precedence parsing with subtyped data-structures.
- Since
3.0.0
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.
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.
- Since
2.2.0