public void checkActionRedefinitions(List<GrammarAST> actions) {
		if (actions == null) return;
		String scope = g.getDefaultActionScope();
		String name;
		GrammarAST nameNode;
		for (GrammarAST ampersandAST : actions) {
			nameNode = (GrammarAST) ampersandAST.getChild(0);
			if (ampersandAST.getChildCount() == 2) {
				name = nameNode.getText();
			}
			else {
				scope = nameNode.getText();
				name = ampersandAST.getChild(1).getText();
			}
			Set<String> scopeActions = actionScopeToActionNames.get(scope);
			if (scopeActions == null) { // init scope
				scopeActions = new HashSet<String>();
				actionScopeToActionNames.put(scope, scopeActions);
			}
			if (!scopeActions.contains(name)) {
				scopeActions.add(name);
			}
			else {
				errMgr.grammarError(ErrorType.ACTION_REDEFINITION,
						g.fileName, nameNode.token, name);
			}
		}
	}
Check for symbol problems; no side-effects.  Inefficient to walk rules
 and such multiple times, but I like isolating all error checking outside
 of code that actually defines symbols etc...

 Side-effect: strip away redef'd rules.
tool/src/org/antlr/v4/semantics/SymbolChecks.java