@Override
	public Handle action(ActionAST action) {
		int ruleIndex = currentRule.index;
		int actionIndex = g.lexerActions.get(action);
		LexerCustomAction lexerAction = new LexerCustomAction(ruleIndex, actionIndex);
		return action(action, lexerAction);
	}
Maps from a {@link LexerAction} object to the action index.
tool/src/org/antlr/v4/automata/LexerATNFactory.java