From 981d6b9bddacee6a204ac48f2a4e27f4cca1bd47 Mon Sep 17 00:00:00 2001 From: Inari Listenmaa Date: Thu, 20 Feb 2025 20:52:21 +0100 Subject: [PATCH] Specify that extending a grammar doesn't inherit the startcat --- doc/tutorial/gf-tutorial.t2t | 7 +++++++ 1 file changed, 7 insertions(+) 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: ```