text: public virtual void Walk(IParseTreeListener listener, IParseTree t){if (t is IErrorNode){listener.VisitErrorNode((IErrorNode)t);return;}else{if (t is ITerminalNode){listener.VisitTerminal((ITerminalNode)t);return;}}IRuleNode r = (IRuleNode)t;EnterRule(listener, r);int n = r.ChildCount;for (int i = 0; i < n; i++){Walk(listener, r.GetChild(i));}ExitRule(listener, r);}