public ATN getATN() {
		if ( atn==null ) {
			ParserATNFactory factory = new ParserATNFactory(this);
			atn = factory.createATN();
		}
		return atn;
	}
Undefine the specified rule from this {@link Grammar} instance. The
instance {@code r} is removed from {@link #rules} and
{@link #indexToRule}. This method updates the {@link Rule#index} field
for all rules defined after {@code r}, and decrements {@link #ruleNumber}
in preparation for adding new rules.
<p>
This method does nothing if the current {@link Grammar} does not contain
the instance {@code r} at index {@code r.index} in {@link #indexToRule}.
</p>

@param r
@return {@code true} if the rule was removed from the {@link Grammar}
instance; otherwise, {@code false} if the specified rule was not defined
in the grammar.
tool/src/org/antlr/v4/tool/Grammar.java