From 5e0dad4362066d949a3709ce047aef234b002ac5 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 6 Jan 2006 22:19:02 +0000 Subject: [PATCH] documenting CC patterns --- doc/gf-history.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/gf-history.html b/doc/gf-history.html index 8b96959cb..7b4e1091c 100644 --- a/doc/gf-history.html +++ b/doc/gf-history.html @@ -19,6 +19,24 @@ for creating SLF networks with sub-automata.
+6/1/2006 (AR) Concatenative string patterns to help morphology definitions. +The pattern Predef.CC p1 p2 matches a string literal s +with the first (i.e. shortest-prefix) division s1 + s2 = s such that +p1 matches s1 and p2 matches s2. For example, +the following expression produces the English plural forms +boy-boys, play-plays, fly-flies, dog-dogs: +
+  plur : Str -> Str = \s -> case s of {
+    CC x (CC ("a" | "o") "y") => s + "s" ;
+    CC x "y"                  => x + "ies" ;
+    _                         => s + "s"
+    } ;
+
+This can be seen as a step towards regular expression string patterns. +The natural notation p1 + p2 will be considered later. + +
+ 22/12 Release of GF 2.4.