summaryrefslogtreecommitdiff
path: root/doc/tutorial
diff options
context:
space:
mode:
authorAndreas Källberg <anka.213@gmail.com>2020-09-05 21:11:12 +0200
committerAndreas Källberg <anka.213@gmail.com>2020-09-05 21:11:12 +0200
commit56f94da772566a1960d889c14c420ee832038365 (patch)
tree86737b1039dfa03b3fb289cdb309b80a5f35f759 /doc/tutorial
parent57ce76dbc121ee554675b9ee6136441ec0bb5710 (diff)
parentbca0691cb028fe33ae1b77e71752d4e937490ff1 (diff)
Merge remote-tracking branch 'origin/master' into fix-newer-cabal
Diffstat (limited to 'doc/tutorial')
-rw-r--r--doc/tutorial/gf-tutorial.t2t11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/tutorial/gf-tutorial.t2t b/doc/tutorial/gf-tutorial.t2t
index 525749822..469166090 100644
--- a/doc/tutorial/gf-tutorial.t2t
+++ b/doc/tutorial/gf-tutorial.t2t
@@ -898,7 +898,7 @@ Parentheses are only needed for grouping.
Parsing something that is not in grammar will fail:
```
> parse "hello dad"
- Unknown words: dad
+ The parser failed at token 2: "dad"
> parse "world hello"
no tree found
@@ -2948,7 +2948,7 @@ We need the following combinations:
```
We also need **lexical insertion**, to form phrases from single words:
```
- mkCN : N -> NP ;
+ mkCN : N -> CN ;
mkAP : A -> AP ;
```
Naming convention: to construct a //C//, use a function ``mk``//C//.
@@ -2969,7 +2969,7 @@ can be built as follows:
```
mkCl
(mkNP these_Det
- (mkCN (mkAP very_AdA (mkAP warm_A)) (mkCN pizza_CN)))
+ (mkCN (mkAP very_AdA (mkAP warm_A)) (mkCN pizza_N)))
(mkAP italian_AP)
```
The task now: to define the concrete syntax of ``Foods`` so that
@@ -4200,7 +4200,8 @@ We construct a calculator with addition, subtraction, multiplication, and
division of integers.
```
abstract Calculator = {
-
+ flags startcat = Exp ;
+
cat Exp ;
fun
@@ -4226,7 +4227,7 @@ We begin with a
concrete syntax that always uses parentheses around binary
operator applications:
```
- concrete CalculatorP of Calculator = {
+ concrete CalculatorP of Calculator = open Prelude in {
lincat
Exp = SS ;