summaryrefslogtreecommitdiff
path: root/src/GF/UseGrammar/Linear.hs
diff options
context:
space:
mode:
authoraarne <unknown>2004-06-22 12:33:31 +0000
committeraarne <unknown>2004-06-22 12:33:31 +0000
commit53f7d4ecfb7b101c29115d3ba7285757808bbb9c (patch)
tree583ba348c14a7a22d7e21801e321e3355b88fdb0 /src/GF/UseGrammar/Linear.hs
parent3986f8c265e09043770480fe85ae5350e807a4a4 (diff)
fixes in parsing
Diffstat (limited to 'src/GF/UseGrammar/Linear.hs')
-rw-r--r--src/GF/UseGrammar/Linear.hs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/GF/UseGrammar/Linear.hs b/src/GF/UseGrammar/Linear.hs
index 954500822..da1eefe09 100644
--- a/src/GF/UseGrammar/Linear.hs
+++ b/src/GF/UseGrammar/Linear.hs
@@ -161,10 +161,11 @@ allLinTables gr c t = do
gets (ps,t) = liftM (curry id ps . cc . map str2strings) $ strsFromTerm t
cc = concat . intersperse ["/"]
-prLinTable :: [[(Label,[([Patt],[String])])]] -> [String]
-prLinTable = concatMap prOne . concat where
- prOne (lab,pss) = prt lab : map pr pss ----
- pr (ps,ss) = unwords (map prt_ ps) +++ ":" +++ unwords ss
+prLinTable :: Bool -> [[(Label,[([Patt],[String])])]] -> [String]
+prLinTable pars = concatMap prOne . concat where
+ prOne (lab,pss) = (if pars then ((prt lab) :) else id) (map pr pss) ----
+ pr (ps,ss) = (if pars then ((unwords (map prt_ ps) +++ ":") +++)
+ else id) (unwords ss)
{-
-- the value is a list of strs