mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
the pmcfg_pretty printer now prints the actual grammar used for parsing
This commit is contained in:
@@ -56,7 +56,7 @@ isLiteralFCat = (`elem` [fcatString, fcatInt, fcatFloat, fcatVar])
|
|||||||
ppPMCFG :: ParserInfo -> Doc
|
ppPMCFG :: ParserInfo -> Doc
|
||||||
ppPMCFG pinfo =
|
ppPMCFG pinfo =
|
||||||
text "productions" $$
|
text "productions" $$
|
||||||
nest 2 (vcat [ppProduction (fcat,prod) | (fcat,set) <- IntMap.toList (productions0 pinfo), prod <- Set.toList set]) $$
|
nest 2 (vcat [ppProduction (fcat,prod) | (fcat,set) <- IntMap.toList (productions pinfo), prod <- Set.toList set]) $$
|
||||||
text "functions" $$
|
text "functions" $$
|
||||||
nest 2 (vcat (map ppFun (assocs (functions pinfo)))) $$
|
nest 2 (vcat (map ppFun (assocs (functions pinfo)))) $$
|
||||||
text "sequences" $$
|
text "sequences" $$
|
||||||
|
|||||||
Reference in New Issue
Block a user