@Override
	public void modeDef(GrammarAST m, GrammarAST ID) {
		if ( !g.isLexer() ) {
			g.tool.errMgr.grammarError(ErrorType.MODE_NOT_IN_LEXER, g.fileName,
									   ID.token, ID.token.getText(), g);
		}
	}
Value of caseInsensitive option (false if not defined)
tool/src/org/antlr/v4/semantics/BasicSemanticChecks.java