diff options
| author | Inari Listenmaa <inari.listenmaa@gmail.com> | 2025-02-20 20:52:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-20 20:52:21 +0100 |
| commit | 981d6b9bddacee6a204ac48f2a4e27f4cca1bd47 (patch) | |
| tree | 8775ed3595e4e3df6f94cfccb000947503d4c593 /doc/tutorial | |
| parent | 41f45e572b31abf197b5896645aa856abfb406de (diff) | |
Specify that extending a grammar doesn't inherit the startcat
Diffstat (limited to 'doc/tutorial')
| -rw-r--r-- | doc/tutorial/gf-tutorial.t2t | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/tutorial/gf-tutorial.t2t b/doc/tutorial/gf-tutorial.t2t index a734a57b6..c4ccb6aab 100644 --- a/doc/tutorial/gf-tutorial.t2t +++ b/doc/tutorial/gf-tutorial.t2t @@ -1739,6 +1739,13 @@ A new module can **extend** an old one: Pizza : Kind ; } ``` +Note that the extended grammar doesn't inherit the start +category from the grammar it extends, so if you want to +generate sentences with this grammar, you'll have to either +add a startcat (e.g. ``flags startcat = Question ;``), +or in the GF shell, specify the category to ``generate_random`` or ``geneate_trees`` +(e.g. ``gr -cat=Comment`` or ``gt -cat=Question``). + Parallel to the abstract syntax, extensions can be built for concrete syntaxes: ``` |
