Safe Haskell | None |
---|
Text.GrammarCombinators.Transform.CombineGrammars
- combineGrammars :: forall p phiL phiR rL rR rrL rrR t ix. (EpsProductionRule p, ProductionRule p, TokenProductionRule p t, RecProductionRule p (MergeDomain phiL phiR) (EitherFunctor rL rR), LoopProductionRule p (MergeDomain phiL phiR) (EitherFunctor rL rR)) => (forall p' ix'. (ProductionRule p', EpsProductionRule p', TokenProductionRule p' t, RecProductionRule p' phiL rL, LoopProductionRule p' phiL rL, ProductionRuleWithLibrary p' phiR rR) => phiL ix' -> p' (rrL ix')) -> (forall p' ix'. (ProductionRule p', EpsProductionRule p', TokenProductionRule p' t, RecProductionRule p' phiR rR, LoopProductionRule p' phiR rR, ProductionRuleWithLibrary p' phiL rL) => phiR ix' -> p' (rrR ix')) -> MergeDomain phiL phiR ix -> p (EitherFunctor rrL rrR ix)
Documentation
combineGrammars :: forall p phiL phiR rL rR rrL rrR t ix. (EpsProductionRule p, ProductionRule p, TokenProductionRule p t, RecProductionRule p (MergeDomain phiL phiR) (EitherFunctor rL rR), LoopProductionRule p (MergeDomain phiL phiR) (EitherFunctor rL rR)) => (forall p' ix'. (ProductionRule p', EpsProductionRule p', TokenProductionRule p' t, RecProductionRule p' phiL rL, LoopProductionRule p' phiL rL, ProductionRuleWithLibrary p' phiR rR) => phiL ix' -> p' (rrL ix')) -> (forall p' ix'. (ProductionRule p', EpsProductionRule p', TokenProductionRule p' t, RecProductionRule p' phiR rR, LoopProductionRule p' phiR rR, ProductionRuleWithLibrary p' phiL rL) => phiR ix' -> p' (rrR ix')) -> MergeDomain phiL phiR ix -> p (EitherFunctor rrL rrR ix)Source
Combine two grammars into a single one. The argument grammars are over
different domains phiL
and phiR
, but they are allowed to refer to
each other's non-terminals
using the lib
primitive from the ProductionRuleWithLibrary
type class.
The resulting grammar is over the combined domain 'MergeDomain phiL phiR'.