summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2009-06-20 08:39:30 +0000
committeraarne <aarne@chalmers.se>2009-06-20 08:39:30 +0000
commit48c755597598fc4656603a90997ebe484488a8f9 (patch)
tree5058545292c76baa6ed347094a2cb01d61996bac
parent30f90d707a3fa271bdd468ac7071faa79dd80ce1 (diff)
accepting + patterns in pre expressions
-rw-r--r--next-lib/src/english/ResEng.gf10
-rw-r--r--src/GF/Compile/Compute.hs4
2 files changed, 8 insertions, 6 deletions
diff --git a/next-lib/src/english/ResEng.gf b/next-lib/src/english/ResEng.gf
index 46c9e9580..0be501e7d 100644
--- a/next-lib/src/english/ResEng.gf
+++ b/next-lib/src/english/ResEng.gf
@@ -175,13 +175,11 @@ resource ResEng = ParamX ** open Prelude in {
-- "o" ("one-sided"), vocalic "u" ("umbrella").
artIndef = pre {
- "a" ;
- "an" / strs {"a" ; "e" ; "i" ; "o" ; "A" ; "E" ; "I" ; "O" }
+ "eu" | "Eu" | "uni" | "up" => "a" ;
+ "un" => "an" ;
+ "a" | "e" | "i" | "o" | "A" | "E" | "I" | "O" => "an" ;
+ _ => "a"
} ;
---- artIndef = pre {
---- "a" | "e" | "i" | "o" | "A" | "E" | "I" | "O" => "an" ;
---- _ => "a"
---- } ;
artDef = "the" ;
diff --git a/src/GF/Compile/Compute.hs b/src/GF/Compile/Compute.hs
index 126575946..cf0803d98 100644
--- a/src/GF/Compile/Compute.hs
+++ b/src/GF/Compile/Compute.hs
@@ -414,6 +414,10 @@ computeTermOpt rec gr = comput True where
getPatts p = case p of
PAlt a b -> liftM2 (++) (getPatts a) (getPatts b)
PString s -> return [K s]
+ PSeq a b -> do
+ as <- getPatts a
+ bs <- getPatts b
+ return [K (s ++ t) | K s <- as, K t <- bs]
_ -> fail $ "not valid pattern in pre expression" +++ prt p
{- ----