summaryrefslogtreecommitdiff
path: root/src/GF/Speech/TransformCFG.hs
diff options
context:
space:
mode:
authorbringert <bringert@cs.chalmers.se>2007-06-28 01:26:09 +0000
committerbringert <bringert@cs.chalmers.se>2007-06-28 01:26:09 +0000
commitda6e0efc1118660b39cbbfcde7f01d380661749a (patch)
treeb6ab85a561f6ba65ecb5cb2ee9337bb87a197782 /src/GF/Speech/TransformCFG.hs
parentcbf851b516541634be831307888dd61d8dc51c9b (diff)
CFRules tracing.
Diffstat (limited to 'src/GF/Speech/TransformCFG.hs')
-rw-r--r--src/GF/Speech/TransformCFG.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/GF/Speech/TransformCFG.hs b/src/GF/Speech/TransformCFG.hs
index 4e38216d9..bca42d4fe 100644
--- a/src/GF/Speech/TransformCFG.hs
+++ b/src/GF/Speech/TransformCFG.hs
@@ -369,3 +369,9 @@ isLeftLinear :: Ord c =>
-> CFRule c n t -- ^ The rule to check for left-linearity
-> Bool
isLeftLinear cs = noCatsInSet cs . drop 1 . ruleRhs
+
+prCFRules :: CFRules -> String
+prCFRules = unlines . map prRule . allRules
+ where
+ prRule r = lhsCat r ++ " --> " ++ unwords (map prSym (ruleRhs r))
+ prSym = symbol id (\t -> "\""++ t ++"\"")