public Collection<ParseTree> evaluate(ParseTree t) {List<ParseTree> nodes = new ArrayList<ParseTree>();for (Tree c : Trees.getChildren(t)) {if ( c instanceof ParserRuleContext ) {ParserRuleContext ctx = (ParserRuleContext)c;if ( (ctx.getRuleIndex() == ruleIndex && !invert) ||(ctx.getRuleIndex() != ruleIndex && invert) ){nodes.add(ctx);}}}return nodes;}

public override ICollection<IParseTree> Evaluate(IParseTree t){IList<IParseTree> nodes = new List<IParseTree>();foreach (ITree c in Trees.GetChildren(t)){if (c is ParserRuleContext){ParserRuleContext ctx = (ParserRuleContext)c;if ((ctx.RuleIndex == ruleIndex && !invert) || (ctx.RuleIndex != ruleIndex && invert)){nodes.Add(ctx);}}}return nodes;}
