summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2006-09-01 15:11:22 +0000
committeraarne <aarne@cs.chalmers.se>2006-09-01 15:11:22 +0000
commit39a31d07d5c70f490c04da0969716b4bd12bb6ae (patch)
tree2ef660f8e34a3dc8cedf9849a2249d59836868d4 /doc
parent04933ef3c9ad381b2d09b7882b4204f6ca53208c (diff)
the Error type; better lexer error reporting
Diffstat (limited to 'doc')
-rw-r--r--doc/gf-history.html41
1 files changed, 40 insertions, 1 deletions
diff --git a/doc/gf-history.html b/doc/gf-history.html
index f9eded9cb..aedb2a8aa 100644
--- a/doc/gf-history.html
+++ b/doc/gf-history.html
@@ -14,7 +14,46 @@ Changes in functionality since May 17, 2005, release of GF Version 2.2
<p>
-22/6 (AR) Release of GF version 2.6.
+1/9 (AR) New way for managing errors in grammar compilation:
+<pre>
+ Predef.Error : Type ;
+ Predef.error : Str -> Predef.Error ;
+</pre>
+Denotationally, <tt>Error</tt> is the empty type and thus a
+subtype of any other types: it can be used anywhere. But the
+<tt>error</tt> function is not canonical. Hence the compilation
+is interrupted when <tt>(error s)</tt> is translated to GFC, and
+the message <tt>s</tt> is emitted. An example use is given in
+<tt>english/ParadigmsEng.gf</tt>:
+<pre>
+ regDuplV : Str -> V ;
+ regDuplV fit =
+ case last fit of {
+ ("a" | "e" | "i" | "o" | "u" | "y") =>
+ Predef.error (["final duplication makes no sense for"] ++ fit) ;
+ t =>
+ let fitt = fit + t in
+ mkV fit (fit + "s") (fitt + "ed") (fitt + "ed") (fitt + "ing")
+ } ;
+</pre>
+This function thus cannot be applied to a stem ending with a vowel,
+which is exactly what we want. In future, it may be good to add similar
+checks to all morphological paradigms in the resource.
+
+
+<p>
+
+16/8 (AR) New generation algorithm: slower but works with less
+memory. Default of <tt>gt</tt>; use <tt>gt -mem</tt> for the old
+algorithm. The new option <tt>gt -all</tt> lazily generates all
+trees until interrupted. It cannot be piped to other GF commands,
+hence use <tt>gt -all -lin</tt> to print out linearized strings
+rather than trees.
+
+<hr>
+
+
+22/6 (AR) <b>Release of GF version 2.6</b>.
<p>