@Override
	public boolean undefineRule(Rule r) {
		if (!super.undefineRule(r)) {
			return false;
		}

		boolean removed = modes.get(r.mode).remove(r);
		assert removed;
		return true;
	}
DEFAULT_MODE rules are added first due to grammar syntax order
tool/src/org/antlr/v4/tool/LexerGrammar.java