grammar-combinators-0.2.6: A parsing library of context-free grammar combinators.

Text.GrammarCombinators.Utils.UnfoldDepthFirst

Documentation

class ProductionRule p => SimpleRecProductionRule p phi r rr | p -> phi, p -> r, p -> rr whereSource

Methods

ref' :: phi ix -> p (rr ix) -> p (r ix)Source

cutRecursion :: phi ix -> p (rr ix)Source

Instances

(EqFam phi, MemoFam phi) => SimpleRecProductionRule (IsDeadRule phi r t rr) phi r rr 
EqFam phi => SimpleRecProductionRule (FoldReachableIntRule phi r t rr n) phi r rr 

class SimpleLoopProductionRule p phi r rr | p -> phi, p -> r, p -> rr whereSource

Methods

manyRef' :: phi ix -> p (rr ix) -> p [r ix]Source

many1Ref' :: phi ix -> p (rr ix) -> p [r ix]Source

Instances

(EqFam phi, MemoFam phi) => SimpleLoopProductionRule (IsDeadRule phi r t rr) phi r rr 
EqFam phi => SimpleLoopProductionRule (FoldReachableIntRule phi r t rr n) phi r rr 

type UDFGrammar p phi r t rr = forall ix. phi ix -> p (rr ix)Source

newtype WrapUR p r ix Source

Constructors

WUR 

Fields

unWUR :: p (r ix)
 

declareDead :: (EqFam phi, ProductionRule p, SimpleRecProductionRule p phi r rr) => phi ix -> UDFGrammar p phi r t rr -> UDFGrammar p phi r t rrSource

unfoldDepthFirst'' :: forall p phi r rr t v. (ProductionRule p, EqFam phi, TokenProductionRule p t, EpsProductionRule p, BiasedProductionRule p, PenaltyProductionRule p, SimpleRecProductionRule p phi r rr, SimpleLoopProductionRule p phi r rr) => UnfoldDepthFirstRule p phi r t rr v -> GAnyExtendedContextFreeGrammar phi t r rr -> (UDFGrammar p phi r t rr -> UDFGrammar p phi r t rr) -> p vSource

unfoldDepthFirst' :: forall p phi r rr t ix. (ProductionRule p, EqFam phi, EpsProductionRule p, PenaltyProductionRule p, BiasedProductionRule p, TokenProductionRule p t, SimpleRecProductionRule p phi r rr, SimpleLoopProductionRule p phi r rr) => GAnyExtendedContextFreeGrammar phi t r rr -> (UDFGrammar p phi r t rr -> UDFGrammar p phi r t rr) -> phi ix -> p (rr ix)Source