Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- data Flags = Flags {}
- defaultFlags :: Flags
- runOptions :: ParseOptions -> Flags
- type ParseOption = Flags -> Flags
- type ParseOptions = [ParseOption]
- fullSPPF :: ParseOption
- allNodes :: ParseOption
- packedNodesOnly :: ParseOption
- strictBinarisation :: ParseOption
- maximumErrors :: Int -> ParseOption
- noSelectTest :: ParseOption
Documentation
Flags to influence the behaviour of the parser.
Flags | |
|
defaultFlags :: Flags Source #
The default flags:
* Do not add symbol nodes to the SPPF
.
* Do not add intermediate nodes to the SPPF
.
* Do not add edges to the SPPF
.
* Flexible binarisation.
* The three furthest discoveries of a token mismatch are reported.
* Select tests are performed.
runOptions :: ParseOptions -> Flags Source #
Execute the given Options
in left-to-right order on defaultFlags
.
type ParseOptions = [ParseOption] Source #
A list of ParserOption
s
fullSPPF :: ParseOption Source #
Create the SPPF
with all nodes and edges, not necessarily strictly binarised.
allNodes :: ParseOption Source #
Create all nodes, but no edges between nodes.
packedNodesOnly :: ParseOption Source #
Create packed-nodes only.
strictBinarisation :: ParseOption Source #
Fully binarise the SPPF, resulting in a larger SPPF
and possibly slower runtimes.
When this flag is on, packed nodes can only have a single symbol node child
or one intermediate node child and one symbol node child.
With the flag disabled a packed node can have two symbol node children.
maximumErrors :: Int -> ParseOption Source #
Set the maximum number of errors shown in case of an unsuccessful parse.
noSelectTest :: ParseOption Source #
Turn of select tests. Disables lookahead.