summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-06-18 10:04:10 +0000
committerkrasimir <krasimir@chalmers.se>2010-06-18 10:04:10 +0000
commitfd3cddcf5e70b42936f93c736067ebad29b81d47 (patch)
tree4d7a1acd1a6ade60a217e1419732169d2e36abd2 /src
parentad814e12c5df8806a3858e102eaa6e6eb677f99f (diff)
PGF.Printer now dumps the printnames as well
Diffstat (limited to 'src')
-rw-r--r--src/runtime/haskell/PGF/Printer.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/runtime/haskell/PGF/Printer.hs b/src/runtime/haskell/PGF/Printer.hs
index aab89ee5d..4c9961b55 100644
--- a/src/runtime/haskell/PGF/Printer.hs
+++ b/src/runtime/haskell/PGF/Printer.hs
@@ -51,7 +51,9 @@ ppCnc name cnc =
text "sequences" $$
nest 2 (vcat (map ppSeq (assocs (sequences cnc)))) $$
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 '}'
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) $$
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 (SymLit d r) = char '<' <> int d <> comma <> int r <> char '>'
ppSymbol (SymKS ts) = ppStrs ts