Next: Recursion and cycles, Previous: Nulling, Up: Terms [Contents][Index]
If any derivation from the start symbol uses a rule, that rule is called reachable or accessible. A rule that is not accessible is called unreachable or inaccessible. If any derivation which results in a sentence uses a rule, that rule is said to be productive. A rule that is not productive is called unproductive. A rule is productive iff every symbol on its RHS is productive. A symbol is productive iff it is a terminal or it is the LHS of a productive rule. A rule which is inaccessible or unproductive is called a useless rule. Marpa can handle grammars with useless rules.
A symbol is reachable or accessible if it appears in a reachable rule. If a symbol is not reachable, it is unreachable or inaccessible. A symbol is productive if it appears on the LHS of a productive rule, or if it is a nullable symbol. If a symbol is not productive, it is unproductive. A symbol which is inaccessible or unproductive is called a useless symbol. Marpa can handle grammars with useless symbols.