> What do you mean by unreachable?
It means that you cannot reach it if you start from the <start> element and
follow all the refs, and the refs from those refs and so on. For example,
in
<grammar>
<start>
<ref name="foo"/>
</start>
<define name="foo">
<element name="foo">
<ref name="bar"/>
</element>
</define>
<define name="bar">
<text/>
</define>
<define name="baz">
<element name="baz">
<optional>
<ref name="baz"/>
</optional>
</element>
</define>
</grammar>
foo and bar are reachable but baz is not. If a definition is not reachable
then you can remove it without changing the meaning of the grammar.
James