diff options
| author | bringert <unknown> | 2005-06-21 14:19:03 +0000 |
|---|---|---|
| committer | bringert <unknown> | 2005-06-21 14:19:03 +0000 |
| commit | 1073bc1d3f4bc88ec1e3baa59f8b6571602df1c0 (patch) | |
| tree | 4ed93ef1ba2e6df141953e3db107e182ca85b99e | |
| parent | 9cf71d3bba75f157e72bc08f984a2262885ed506 (diff) | |
Wrote about list syntax in gf-history.html
| -rw-r--r-- | doc/gf-history.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/doc/gf-history.html b/doc/gf-history.html index e098570e4..7b40c4d00 100644 --- a/doc/gf-history.html +++ b/doc/gf-history.html @@ -21,6 +21,54 @@ command. <p> +17/6 (BB) There is now support for lists in GF abstract syntax. +A list category is declared as: +<pre> +cat [C] +</pre> +or +<pre> +cat [C]{n} +</pre> +where <tt>C</tt> is a category and <tt>n</tt> is a non-negative integer. +<tt>cat [C]</tt> is equivalent to <tt>cat [C]{0}</tt>. List category +syntax can be used whereever categories are used. + +<p> + +<tt>cat [C]{n}</tt> is equivalent to the declarations: +<pre> +cat ListC +fun BaseC : C^n -> ListC +fun ConsC : C -> ListC -> ListC +</pre> + +where <tt>C^0 -> X</tt> means <tt>X</tt>, and <tt>C^m</tt> (where +m > 0) means <tt>C -> C^(m-1)</tt>. + +<p> + +A lincat declaration on the form: +<pre> +lincat [C] = T +</pre> +is equivalent to +<pre> +lincat ListC = T +</pre> + +The linearizations of the list constructors are written +just like they would be if the function declarations above +had been made manually, e.g.: +<pre> +lin BaseC x_1 ... x_n = t +lin ConsC x xs = t' +</pre> + + + +<p> + 10/6 (AR) Preprocessor of <tt>.gfe</tt> files can now be performed as part of any grammar compilation. The flag <tt>-ex</tt> causes GF to look for the <tt>.gfe</tt> files and preprocess those that are younger |
