diff --git a/doc/gf-refman.html b/doc/gf-refman.html index 188a063a8..376689a9a 100644 --- a/doc/gf-refman.html +++ b/doc/gf-refman.html @@ -5,7 +5,7 @@
lindef f = tlindef C = tlinref C = t
-The defaults can also be used for linearizing metavariables
-in an interactive syntax editor.
+The other use of the defaults is for linearizing metavariables
+and abstract functions without linearization in the concrete syntax.
+In the first case the default linearization is applied to
+the string "?X" where X is the unique index
+of the metavariable, and in the second case the string is
+"[f]" where f is the name of the abstract
+function with missing linearization.
+
Usually, linearization defaults are generated by using the default @@ -1376,8 +1390,62 @@ definition is by structural recursion on the type:
The notion of the first value of a parameter type (#1(P)) is defined -here below. +below.
+ ++A linearization reference definition, +
linref C = t
+
+The reference linearization is always applied to the top-level node
+of the abstract syntax tree. For example when we linearize the
+tree f x1 x2 .. xn, then we first apply f
+to its arguments which gives us an object of the linearization type of
+its category. After that we apply the reference linearization
+for the same category to get a string out of the object. This
+is particularly useful when the linearization type of C
+contains discontious constituents. In this case usually the reference
+linearization glues the constituents together to produce an
+intuitive linearization string.
+
+The reference linearization is also used for linearizing metavariables
+which stand in function position. For example the tree
+f (? x1 x2 .. xn) is linearized as follows. Each
+of the arguments x1 x2 .. xn is linearized, and after that
+the reference linearization of the its category is applied
+to the output of the linearization. The result is a sequence of n
+strings which are concatenated into a single string. The final string
+is the input to the default linearization of the category
+for the argument of f. After applying the default linearization
+we get an object that we could safely pass to f.
+
+Usually, linearization references are generated by using the +rule that "picks the first string in the linearization type". The precise +definition is by structural recursion on the type: +
+(Just o) or Nothing.
+When we compute the reference for a table or a record then we pick
+the reference for the first expression for which the recursive call
+gives us Just. If we get Nothing for
+all of them then the final result is Nothing too.
+
@@ -2927,7 +2995,7 @@ literals).
The following predefined operations are defined in the resource module
-prelude/Predefined.gf. Their implementations are defined as
+prelude/Predef.gf. Their implementations are defined as
a part of the GF grammar compiler.
(L : Type) -> L -> Str |
find the "first" string | +|
nonExist |
+Str |
+this is a special token marking +non-existing morphological forms |
+
BIND |
+Str |
+this is a special token marking +that the surrounding tokens should not +be separated by space |
+
SOFT_BIND |
+Str |
+this is a special token marking +that the surrounding tokens may not +be separated by space |
+
lindeflinrefofopenoperparamparampreprintnameresourcestrsstrstabletransfervariantswherewherewithlinref [Def]lin [Def]