示例#1
0
 protected void exitRule(ParseTreeListener listener, RuleNode r) {
   ParserRuleContext ctx = (ParserRuleContext) r.getRuleContext();
   ctx.exitRule(listener);
   listener.exitEveryRule(ctx);
   GlobalInfo info = GlobalInfo.getInstance();
   info.exitRuleSetup();
 }
示例#2
0
文件: Parser.java 项目: antlr/antlr4
 /**
  * Notify any parse listeners of an exit rule event.
  *
  * @see #addParseListener
  */
 protected void triggerExitRuleEvent() {
   // reverse order walk of listeners
   for (int i = _parseListeners.size() - 1; i >= 0; i--) {
     ParseTreeListener listener = _parseListeners.get(i);
     _ctx.exitRule(listener);
     listener.exitEveryRule(_ctx);
   }
 }
示例#3
0
 protected <Symbol> void exitRule(ParseTreeListener<Symbol> listener, ParseTree.RuleNode r) {
   @SuppressWarnings("unchecked")
   ParserRuleContext<Symbol> ctx = (ParserRuleContext<Symbol>) r.getRuleContext();
   ctx.exitRule(listener);
   listener.exitEveryRule(ctx);
 }