mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
PGF.Printer now dumps the printnames as well
This commit is contained in:
@@ -51,7 +51,9 @@ ppCnc name cnc =
|
|||||||
text "sequences" $$
|
text "sequences" $$
|
||||||
nest 2 (vcat (map ppSeq (assocs (sequences cnc)))) $$
|
nest 2 (vcat (map ppSeq (assocs (sequences cnc)))) $$
|
||||||
text "categories" $$
|
text "categories" $$
|
||||||
nest 2 (vcat (map ppCncCat (Map.toList (cnccats cnc))))) $$
|
nest 2 (vcat (map ppCncCat (Map.toList (cnccats cnc)))) $$
|
||||||
|
text "printnames" $$
|
||||||
|
nest 2 (vcat (map ppPrintName (Map.toList (printnames cnc))))) $$
|
||||||
char '}'
|
char '}'
|
||||||
|
|
||||||
ppProduction (fcat,PApply funid args) =
|
ppProduction (fcat,PApply funid args) =
|
||||||
@@ -71,6 +73,9 @@ ppCncCat (id,(CncCat start end labels)) =
|
|||||||
ppCId id <+> text ":=" <+> (text "range " <+> brackets (ppFCat start <+> text ".." <+> ppFCat end) $$
|
ppCId id <+> text ":=" <+> (text "range " <+> brackets (ppFCat start <+> text ".." <+> ppFCat end) $$
|
||||||
text "labels" <+> brackets (vcat (map (text . show) (elems labels))))
|
text "labels" <+> brackets (vcat (map (text . show) (elems labels))))
|
||||||
|
|
||||||
|
ppPrintName (id,name) =
|
||||||
|
ppCId id <+> text ":=" <+> ppStrs [name]
|
||||||
|
|
||||||
ppSymbol (SymCat d r) = char '<' <> int d <> comma <> int r <> char '>'
|
ppSymbol (SymCat d r) = char '<' <> int d <> comma <> int r <> char '>'
|
||||||
ppSymbol (SymLit d r) = char '<' <> int d <> comma <> int r <> char '>'
|
ppSymbol (SymLit d r) = char '<' <> int d <> comma <> int r <> char '>'
|
||||||
ppSymbol (SymKS ts) = ppStrs ts
|
ppSymbol (SymKS ts) = ppStrs ts
|
||||||
|
|||||||
Reference in New Issue
Block a user