public static Tuple <Predicate, bool>[] GetLiteralArray(this PlanningParser.CondEffectContext context,
                                                                IReadOnlyDictionary <string, Predicate> predicateDict, StringDictionary assignment)
        {
            int count = context.termLiteral().Count;

            Tuple <Predicate, bool>[] result = new Tuple <Predicate, bool> [count];
            Parallel.For(0, count, i => result[i] = context.termLiteral()[i].GetLiteral(predicateDict, assignment));
            return(result);
        }
示例#2
0
 /// <summary>
 /// Exit a parse tree produced by <see cref="PlanningParser.condEffect"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitCondEffect([NotNull] PlanningParser.CondEffectContext context)
 {
 }