Exemplo n.º 1
0
        /// <summary>
        /// Converts the given da-effect into a durative effects. A root AND-expression is split into a list of effects.
        /// </summary>
        /// <param name="daEffectAstNode">AST node.</param>
        /// <returns>Converted durative effects.</returns>
        public static DurativeEffects ToDurativeEffects(DaEffectAstNode daEffectAstNode)
        {
            ToDurativeEffectsConverter converter = new ToDurativeEffectsConverter();

            converter.Evaluate(daEffectAstNode);
            return(converter.EffectsData);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initialization of the AST node. Specifies conversion from parse-tree node to AST node.
 /// </summary>
 /// <param name="treeNode">Parse-tree node.</param>
 public override void Init(ParseTreeNode treeNode)
 {
     Name               = treeNode.GetChildString(1);
     Parameters         = treeNode.GetGrandChildAst <TypedListAstNode>(2, 1);
     DurationConstraint = treeNode.GetGrandChildAst <DurationConstraintAstNode>(3, 1);
     Condition          = treeNode.GetGrandChildAst <DaGdAstNode>(4, 1);
     Effect             = treeNode.GetGrandChildAst <DaEffectAstNode>(5, 1);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initialization of the AST node. Specifies conversion from parse-tree node to AST node.
 /// </summary>
 /// <param name="treeNode">Parse-tree node.</param>
 public override void Init(ParseTreeNode treeNode)
 {
     Parameters = treeNode.GetChildAst <TypedListAstNode>(1);
     Effect     = treeNode.GetChildAst <DaEffectAstNode>(2);
 }