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.Backend.Machine.Types.State

Description

This module contains the runtime state of a parser, which is is partially static, since there are many refinements that can be used to improve it but ultimately, most of this exists at runtime in some form or another.

Since: 1.4.0.0

Synopsis

Documentation

data Γ s o xs n r a Source #

A record that bundles together all of the runtime components of a parser in their variously statically augmented forms.

Since: 1.4.0.0

Constructors

Γ 

Fields

  • operands :: OpStack xs

    The current values available for applicative application.

  • retCont :: StaCont s o a r

    The current return continuation when this parser is finished.

  • input :: Input o

    The current offset into the input of the parser.

  • handlers :: Vec n (AugmentedStaHandler s o a)

    The failure handlers that are used to process failure during a parser.

data OpStack xs where Source #

The stack that represents the applicative arguments to a parser. These values, when converted to Code will appear in the generated code, but can be manipulated and combined using this stack, which will not appear in the generated code.

Since: 1.4.0.0

Constructors

Empty :: OpStack '[]

The empty stack, with no operands available.

Op :: Defunc x -> OpStack xs -> OpStack (x ': xs)

A pushed item on the stack, which takes the form of a defunctionalised value.