diff --git a/doc/gf-refman.html b/doc/gf-refman.html index 1db2b0a87..19e943c49 100644 --- a/doc/gf-refman.html +++ b/doc/gf-refman.html @@ -1834,7 +1834,7 @@ Some expressions are moreover left- or right-associative.
pre {"a" ; "an"/vowel}pre {vowel => "an" ; _ => "a"}Str have the following canonical forms:
[]
++ t, where s,t : Str
pre { s ; s1 / p1 ; ... ; sn / pn}, where
+ pre {p1 => s1 ; ... ; pn => sn ; _ => s }, where
- s, s1,...,sn, p1,...,pn :
Str
@@ -2344,13 +2344,16 @@ A prime example of prefix-dependent choice operation is the following
approximative expression for the English indefinite article:
- pre {"a" ; "an" / variants {"a" ; "e" ; "i" ; "o"}}
+ pre {
+ ("a" | "e" | "i" | "o") => "an" ;
+ _ => "a"
+ } ;
This expression can be computed in the context of a subsequent token:
-pre { s ; s1 / p1 ; ... ; sn / pn} ++ t
+pre {p1 => s1 ; ... ; pn => sn ; _ => s } ++ t
==>
- si for the first i such that the prefix pi
@@ -2374,6 +2377,11 @@ subsequent token depends on a run-time variable.
The prefix-dependent choice expression itself may not depend on run-time
variables.
+
+ There is an older syntax for prefix-dependent choice,
+ namely: pre { s ; s1 / p1 ; ... ; sn / pn}. This syntax
+ will not accept strings as patterns.
+
In GF prior to 3.0, a specific type Strs
is used for defining prefixes,