summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoraarne <unknown>2004-05-03 12:39:32 +0000
committeraarne <unknown>2004-05-03 12:39:32 +0000
commitf644f13527d255b65971002e1b48f60d6c781868 (patch)
treed073e0e4a96c267be691c0996201d4403e3b784f /src
parentde3ad4cbd7736e855b6d2a9f140cd2fdb60f089e (diff)
Generation with metavariables.
Diffstat (limited to 'src')
-rw-r--r--src/GF/UseGrammar/Generate.hs6
-rw-r--r--src/Today.hs2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/GF/UseGrammar/Generate.hs b/src/GF/UseGrammar/Generate.hs
index 94d6a6cfe..ad15287b9 100644
--- a/src/GF/UseGrammar/Generate.hs
+++ b/src/GF/UseGrammar/Generate.hs
@@ -43,7 +43,8 @@ gr2sgr gr = [(trId f, ty') | (f,ty) <- funRulesOf gr, ty' <- trTy ty] where
-- str2tr :: STree -> Exp
str2tr t = case t of
SApp (f,ts) -> mkApp (trId f) (map str2tr ts)
-
+ SMeta _ -> mkMeta 0
+---- SString s -> K s
where
trId = cn . zIdent
@@ -75,7 +76,8 @@ generate gr cat i mn mt = case mt of
gen (n+1) (nub [(c,SApp (f, xs)) | (f,(cs,c)) <- gr, xs <- args cs cts] ++ cts)
args :: [SCat] -> [(SCat,STree)] -> [[STree]]
- args cs cts = combinations [constr [t | (k,t) <- cts, k == c] | c <- cs]
+ args cs cts = combinations
+ [constr (SMeta c : [t | (k,t) <- cts, k == c]) | c <- cs]
constr = maybe id take mn
diff --git a/src/Today.hs b/src/Today.hs
index 6a2be6191..1175e0b6e 100644
--- a/src/Today.hs
+++ b/src/Today.hs
@@ -1 +1 @@
-module Today where today = "Sun May 2 15:21:39 CEST 2004"
+module Today where today = "Mon May 3 10:59:20 CEST 2004"