public void verify() throws AssemblyGrammarException {
		if (!productions.containsKey(startName)) {
			throw new AssemblyGrammarException("Start symbol has no defining production");
		}
		for (P prod : productions.values()) {
			for (AssemblySymbol sym : prod.getRHS()) {
				if (sym instanceof AssemblyNonTerminal) {
					AssemblyNonTerminal nt = (AssemblyNonTerminal) sym;
					if (!(productions.containsKey(nt.getName()))) {
						throw new AssemblyGrammarException("Grammar has non-terminal '" +
							nt.getName() + "' without a defining production");
					}
				}
			}
		}
	}
Check that the grammar is consistent

<p>
The grammar is consistent if every non-terminal appearing in the grammar also appears as the
left-hand side of some production. If not, such non-terminals are said to be undefined.

@throws AssemblyGrammarException the grammar is inconsistent, i.e., contains undefined
            non-terminals.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/grammars/AbstractAssemblyGrammar.java