public List<String> getRuleInvocationStack(RuleContext p) {String[] ruleNames = getRuleNames();List<String> stack = new ArrayList<String>();while ( p!=null ) {int ruleIndex = p.getRuleIndex();if ( ruleIndex<0 ) stack.add("n/a");else stack.add(ruleNames[ruleIndex]);p = p.parent;}return stack;}
public virtual IList<string> GetRuleInvocationStack(RuleContext p){string[] ruleNames = RuleNames;IList<string> stack = new List<string>();while (p != null){int ruleIndex = p.RuleIndex;if (ruleIndex < 0){stack.Add("n/a");}else{stack.Add(ruleNames[ruleIndex]);}p = p.Parent;}return stack;}