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

Safe HaskellNone

Text.GrammarCombinators.Utils.PrintGrammar

Synopsis

Documentation

printRule :: (Domain phi, Token t) => GAnyExtendedContextFreeGrammar phi t r rr -> Integer -> phi ix -> StringSource

Print out a single production rule

printGrammar :: forall phi t r rr. (Domain phi, Token t) => GAnyExtendedContextFreeGrammar phi t r rr -> StringSource

Print out a full grammar.

printGrammarInf :: forall phi t r rr. (Domain phi, Token t) => GAnyExtendedContextFreeGrammar phi t r rr -> Integer -> StringSource

Print out a grammar with a depth limit. Intended for infinite grammars.

printReachableGrammar :: forall phi t r rr ix. (Domain phi, Token t) => GAnyExtendedContextFreeGrammar phi t r rr -> phi ix -> StringSource

Print out the part of a grammar that is reachable from a given non-terminal.