Skip to content

Commit 981d6b9

Browse files
authored
Specify that extending a grammar doesn't inherit the startcat
1 parent 41f45e5 commit 981d6b9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

doc/tutorial/gf-tutorial.t2t

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,6 +1739,13 @@ A new module can **extend** an old one:
17391739
Pizza : Kind ;
17401740
}
17411741
```
1742+
Note that the extended grammar doesn't inherit the start
1743+
category from the grammar it extends, so if you want to
1744+
generate sentences with this grammar, you'll have to either
1745+
add a startcat (e.g. ``flags startcat = Question ;``),
1746+
or in the GF shell, specify the category to ``generate_random`` or ``geneate_trees``
1747+
(e.g. ``gr -cat=Comment`` or ``gt -cat=Question``).
1748+
17421749
Parallel to the abstract syntax, extensions can
17431750
be built for concrete syntaxes:
17441751
```

0 commit comments

Comments
 (0)