summaryrefslogtreecommitdiff
path: root/src/GF/Canon/GFCC/PrintGFCC.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-09-29 10:55:36 +0000
committeraarne <aarne@cs.chalmers.se>2006-09-29 10:55:36 +0000
commitb39ecf4c324b674918813099711aaf437d7db1df (patch)
tree052d0b8ccb4d39dc95ffef7c184323b6f1ff2340 /src/GF/Canon/GFCC/PrintGFCC.hs
parentf705205b529e7761f2ba1d0fd4ba5dcf566dbf0d (diff)
new constructs in gfcc, removed lambda
Diffstat (limited to 'src/GF/Canon/GFCC/PrintGFCC.hs')
-rw-r--r--src/GF/Canon/GFCC/PrintGFCC.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/GF/Canon/GFCC/PrintGFCC.hs b/src/GF/Canon/GFCC/PrintGFCC.hs
index c0ac02c1c..65f2520ed 100644
--- a/src/GF/Canon/GFCC/PrintGFCC.hs
+++ b/src/GF/Canon/GFCC/PrintGFCC.hs
@@ -4,7 +4,7 @@ module GF.Canon.GFCC.PrintGFCC where
-- pretty-printer generated by the BNF converter
import GF.Canon.GFCC.AbsGFCC
-import Data.Char
+import Char
-- the top-level printing method
printTree :: Print a => a -> String
@@ -112,6 +112,7 @@ instance Print Concrete where
instance Print AbsDef where
prt i e = case e of
Fun cid type' exp -> prPrec i 0 (concatD [prt 0 cid , doc (showString ":") , prt 0 type' , doc (showString "=") , prt 0 exp])
+ AFl cid str -> prPrec i 0 (concatD [doc (showString "%") , prt 0 cid , doc (showString "=") , prt 0 str])
prtList es = case es of
[] -> (concatD [])
@@ -120,6 +121,7 @@ instance Print AbsDef where
instance Print CncDef where
prt i e = case e of
Lin cid term -> prPrec i 0 (concatD [prt 0 cid , doc (showString "=") , prt 0 term])
+ CFl cid str -> prPrec i 0 (concatD [doc (showString "%") , prt 0 cid , doc (showString "=") , prt 0 str])
prtList es = case es of
[] -> (concatD [])
@@ -143,6 +145,8 @@ instance Print Atom where
AC cid -> prPrec i 0 (concatD [prt 0 cid])
AS str -> prPrec i 0 (concatD [prt 0 str])
AI n -> prPrec i 0 (concatD [prt 0 n])
+ AF d -> prPrec i 0 (concatD [prt 0 d])
+ AM -> prPrec i 0 (concatD [doc (showString "?")])
instance Print Term where
@@ -154,10 +158,9 @@ instance Print Term where
V n -> prPrec i 0 (concatD [doc (showString "$") , prt 0 n])
C n -> prPrec i 0 (concatD [prt 0 n])
F cid -> prPrec i 0 (concatD [prt 0 cid])
- L cid -> prPrec i 0 (concatD [doc (showString "$") , prt 0 cid])
- A cid term -> prPrec i 0 (concatD [doc (showString "(") , prt 0 cid , doc (showString "->") , prt 0 term , doc (showString ")")])
FV terms -> prPrec i 0 (concatD [doc (showString "[|") , prt 0 terms , doc (showString "|]")])
W str term -> prPrec i 0 (concatD [doc (showString "(") , prt 0 str , doc (showString "+") , prt 0 term , doc (showString ")")])
+ RP term0 term -> prPrec i 0 (concatD [doc (showString "(") , prt 0 term0 , doc (showString "@") , prt 0 term , doc (showString ")")])
prtList es = case es of
[] -> (concatD [])