mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 19:22:50 -06:00
accepting + patterns in pre expressions
This commit is contained in:
@@ -175,13 +175,11 @@ resource ResEng = ParamX ** open Prelude in {
|
|||||||
-- "o" ("one-sided"), vocalic "u" ("umbrella").
|
-- "o" ("one-sided"), vocalic "u" ("umbrella").
|
||||||
|
|
||||||
artIndef = pre {
|
artIndef = pre {
|
||||||
"a" ;
|
"eu" | "Eu" | "uni" | "up" => "a" ;
|
||||||
"an" / strs {"a" ; "e" ; "i" ; "o" ; "A" ; "E" ; "I" ; "O" }
|
"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" ;
|
artDef = "the" ;
|
||||||
|
|
||||||
|
|||||||
@@ -414,6 +414,10 @@ computeTermOpt rec gr = comput True where
|
|||||||
getPatts p = case p of
|
getPatts p = case p of
|
||||||
PAlt a b -> liftM2 (++) (getPatts a) (getPatts b)
|
PAlt a b -> liftM2 (++) (getPatts a) (getPatts b)
|
||||||
PString s -> return [K s]
|
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
|
_ -> fail $ "not valid pattern in pre expression" +++ prt p
|
||||||
|
|
||||||
{- ----
|
{- ----
|
||||||
|
|||||||
Reference in New Issue
Block a user