Detect tokens triggering rules in ANTLR4
问题 I have this very simple grammar: grammar DLR; dlr : c 'sub' c ; c : CN | 'not' c | c 'and' c | c 'or' c ; CN : [A-Z]+ ; WS : [ \t\r\n]+ -> skip ; // skip spaces, tabs, newlines When I generate the java code with antlr4 command, I got the java interface DLRBaseListener: public class DLRBaseListener implements DLRListener { @Override public void enterDlr(DLRParser.DlrContext ctx) { } @Override public void exitDlr(DLRParser.DlrContext ctx) { } @Override public void enterC(DLRParser.CContext ctx)