diff --git a/doc/tutorial/gf-tutorial2.html b/doc/tutorial/gf-tutorial2.html index 4a3e15d44..329b47ae3 100644 --- a/doc/tutorial/gf-tutorial2.html +++ b/doc/tutorial/gf-tutorial2.html @@ -7,38 +7,35 @@
--3rd Edition, for GF version 2.2 or later -
--Aarne Ranta -
-
-aarne@cs.chalmers.se
-
The term GF is used for different things: @@ -79,7 +65,7 @@ It will guide you
The program is open-source free software, which you can download via the @@ -109,19 +95,19 @@ To start the GF program, assuming you have installed it, just type
in the shell. You will see GF's welcome message and the prompt >.
Now you are ready to try out your first grammar.
We start with one that is not written in GF language, but
-in the EBNF notation (Extended Backus Naur Form), which GF can also
+in the ubiquitous BNF notation (Backus Naur Form), which GF can also
understand. Type (or copy) the following lines in a file named
paleolithic.ebnf:
S ::= NP VP ;
VP ::= V | TV NP | "is" A ;
- NP ::= ("this" | "that" | "the" | "a") CN ;
+ NP ::= "this" CN | "that" CN | "the" CN | "a" CN ;
CN ::= A CN ;
CN ::= "boy" | "louse" | "snake" | "worm" ;
A ::= "green" | "rotten" | "thick" | "warm" ;
@@ -129,7 +115,17 @@ understand. Type (or copy) the following lines in a file named
TV ::= "eats" | "kills" | "washes" ;
-
+
+(The name paleolithic refers to a larger package
+stoneage,
+which implements a fragment of primitive language. This fragment
+was defined by the linguist Morris Swadesh as a tool for studying
+the historical relations of languages. But as pointed out
+in the Wiktionary article on
+Swadesh list, the
+fragment is also usable for basic communication with foreigners.)
+
The first GF command when using a grammar is to import it. @@ -169,7 +165,7 @@ you imported. Try parsing something else, and you fail no tree found
- +You can also use GF for linearizing @@ -200,7 +196,7 @@ a pipe. this worm is warm
- +Random generation can be quite amusing. So you may want to @@ -220,7 +216,7 @@ generate ten strings with one and the same command: a boy is green
- +
To generate <i>all<i> sentence that a grammar
@@ -250,7 +246,7 @@ You get quite a few trees but not all of them: only up to a given
Quiz. If the command gt generated all
trees in your grammar, it would never terminate. Why?
A pipe of GF commands can have any length, but the "output type" @@ -273,7 +269,7 @@ This facility is good for test purposes: for instance, you may want to see if a grammar is ambiguous, i.e. contains strings that can be parsed in more than one way.
- +To save the outputs of GF commands into a file, you can @@ -296,7 +292,7 @@ the file separately. Without the flag, the grammar could not recognize the string in the file, because it is not a sentence but a sequence of ten sentences.
- +The syntax trees returned by GF's parser in the previous examples @@ -393,7 +389,7 @@ old grammar from the GF shell state. a louse is thick
- +To see what there really is in GF's shell state when a grammar @@ -417,7 +413,7 @@ one more way of defining the same grammar as in Then we will show how the full GF grammar format enables you to do things that are not possible in the weaker formats.
- +A GF grammar consists of two main parts: @@ -897,7 +893,7 @@ The graph uses
<img src="Gatherer.gif">
- +Suppose we want to say, with the vocabulary included in @@ -1043,7 +1039,7 @@ Resource modules can extend other resource modules, in the same way as modules of other types can extend modules of the same type.
- +
Any number of resource modules can be
@@ -1390,7 +1386,7 @@ GF currently requires that all fields in linearization records that
have a table with value type Str have as labels
either s or s with an integer index.
Free variation @@ -1419,11 +1415,7 @@ Dependent types, variable bindings, semantic definitions
Transfer rules
--<body> -<html> -
- +