summaryrefslogtreecommitdiff
path: root/src/GF/Conversion/SimpleToMCFG/Nondet.hs
diff options
context:
space:
mode:
authorpeb <unknown>2005-08-17 07:27:29 +0000
committerpeb <unknown>2005-08-17 07:27:29 +0000
commit73c6ae2a4c1536ce311ad113c20fedd197b3824f (patch)
treed188a62efb7d6f502d65598ca7d70f17004592b4 /src/GF/Conversion/SimpleToMCFG/Nondet.hs
parent26b84344f7a99fe11dcf066bc1d2eafa38828414 (diff)
"Committed_by_peb"
Diffstat (limited to 'src/GF/Conversion/SimpleToMCFG/Nondet.hs')
-rw-r--r--src/GF/Conversion/SimpleToMCFG/Nondet.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/GF/Conversion/SimpleToMCFG/Nondet.hs b/src/GF/Conversion/SimpleToMCFG/Nondet.hs
index 22970bd84..514f2b382 100644
--- a/src/GF/Conversion/SimpleToMCFG/Nondet.hs
+++ b/src/GF/Conversion/SimpleToMCFG/Nondet.hs
@@ -4,9 +4,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/05/13 12:40:19 $
+-- > CVS $Date: 2005/08/17 08:27:29 $
-- > CVS $Author: peb $
--- > CVS $Revision: 1.6 $
+-- > CVS $Revision: 1.7 $
--
-- Converting SimpleGFC grammars to MCFG grammars, nondeterministically.
-- Afterwards, the grammar has to be extended with coercion functions,
@@ -48,7 +48,7 @@ type LinRec = [Lin SCat MLabel Token]
-- main conversion function
maxNrRules :: Int
-maxNrRules = 1000
+maxNrRules = 5000
convertGrammar :: SGrammar -> EGrammar
convertGrammar rules = traceCalcFirst rules' $
@@ -196,6 +196,8 @@ pat =?= Arg nr _ path = updateArg nr (path, pat)
Rec precord =?= Rec record = sequence_ [ maybe mzero (pat =?=) mterm |
(lbl, pat) <- precord,
let mterm = lookup lbl record ]
+-- variants are not allowed in patterns, but in selection terms:
+term =?= Variants terms = member terms >>= (term =?=)
pat =?= term = error $ "(=?=): " ++ prt pat ++ " =?= " ++ prt term
----------------------------------------------------------------------