adp-multi-0.2.3: ADP for multiple context-free languages

Safe HaskellSafe-Inferred

ADP.Multi.Helpers

Description

Provides several convenience functions to ease parsing setup.

Synopsis

Documentation

mk :: [a] -> Array Int aSource

Turns an input sequence into an array for use with a 1-dim parser. Typically, this prepares the input for the axiom function.

mkTwoTrack :: [a] -> [a] -> Array Int aSource

Turns two input sequences into an array for use with a 2-dim parser. Typically, this prepares the input for the axiomTwoTrack function.

axiom :: Array Int a -> RichParser a b -> [b]Source

Convenience function for parsing a given input using a 1-dim parser, usually the start nonterminal.

axiomTwoTrack :: Eq a => Array Int a -> [a] -> [a] -> RichParser a b -> [b]Source

Convenience function for parsing a given input pair using a 2-dim parser, usually the start nonterminal.