parsley-core-2.0.0.0: A fast parser combinator library backed by Typed Template Haskell
LicenseBSD-3-Clause
MaintainerJamie Willis
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Parsley.Internal.Frontend.Analysis

Description

Exposes the analysis passes defined within the analysis submodules via analyse.

Since: 1.5.0.0

Synopsis

Documentation

analyse :: AnalysisFlags -> Fix Combinator a -> Fix Combinator a Source #

Performs Cut-Analysis on the combinator tree (See Parsley.Internal.Frontend.Analysis.Cut)

Since: 1.5.0.0

dependencyAnalysis :: Fix Combinator a -> DMap MVar (Fix Combinator) -> (DMap MVar (Fix Combinator), Map IMVar (Set SomeΣVar)) Source #

Given a top-level parser and a collection of its let-bound subjects performs the following tasks:

  • Determines which parser depend on which others.
  • Use the previous information to remove any dead bindings.
  • Calculate the direct free registers for each binding.
  • Propogate the free registers according to transitive need via the dependency graph.

Returns the non-dead bindings, the information about each bindings free registers, and the next free index for any registers created in code generation.

Since: 1.5.0.0

inliner :: Bool -> MVar a -> Fix Combinator a -> Fix Combinator a Source #

Annotate a tree with its cut-points. We assume a cut for let-bound parsers.

Since: 1.7.0.0

data AnalysisFlags Source #

The packaged flags object.

Since: 1.5.0.0

emptyFlags :: AnalysisFlags Source #

An empty AnalysisFlags instance populated with sensible default values.

Since: 1.5.0.0