From f7bbf6b27b728ccecb0dcf0cdaf49c2591f1eb28 Mon Sep 17 00:00:00 2001 From: aarne Date: Tue, 9 Sep 2008 06:36:36 +0000 Subject: [PATCH] enable matching of ++ strings with regular patterns --- resource/Make.hs | 4 ++++ resource/swedish/ParadigmsSwe.gf | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/resource/Make.hs b/resource/Make.hs index 9d42e1e3..6de938e2 100644 --- a/resource/Make.hs +++ b/resource/Make.hs @@ -85,6 +85,9 @@ make xx = do ifx "lang" $ do mapM_ (gfc pres [] . lang) (optl langsLang) copy "*/*.gfo" dir + ifx "compat" $ do + mapM_ (gfc pres [] . compat) (optl langsLang) + copy "*/*.gfo" dir ifx "api" $ do mapM_ (gfc pres presApiPath . try) (optl langsAPI) copy "*/*.gfo" dir @@ -132,6 +135,7 @@ demos abstr ls = "gr -number=100 | l -treebank " ++ unlexer abstr ls ++ " | ps -to_html | wf -file=resdemo.html" lang (lla,la) = lla ++ "/All" ++ la ++ ".gf" +compat (lla,la) = lla ++ "/Compatibility" ++ la ++ ".gf" try (lla,la) = "api/Try" ++ la ++ ".gf" math (lla,la) = "mathematical/Mathematical" ++ la ++ ".gf" symbolic (lla,la) = "mathematical/Symbolic" ++ la ++ ".gf" diff --git a/resource/swedish/ParadigmsSwe.gf b/resource/swedish/ParadigmsSwe.gf index e49fe210..32a4d4b4 100644 --- a/resource/swedish/ParadigmsSwe.gf +++ b/resource/swedish/ParadigmsSwe.gf @@ -312,9 +312,16 @@ oper mkN : (apa : Str) -> N = regN ; mkN : Str -> Gender -> N = regGenN ; mkN : (nyckel, nycklar : Str) -> N = mk2N ; - mkN : (museum,museet,museer,museerna : Str) -> N = mk4N + mkN : (museum,museet,museer,museerna : Str) -> N = mk4N ; + mkN : Str -> N -> N = compoundN ; } ; + compoundN : Str -> N -> N = \s,no -> { + s = \\n,d,c => s ++ no.s ! n ! d ! c ; + g = no.g ; + lock_N = <> + } ; + mk4N : (museum,museet,museer,museerna : Str) -> N = \apa,apan,apor,aporna -> { s = nounForms apa apan apor aporna ; g = case last apan of {