Esempio n. 1
0
 public override void SetParentBlock(BlockNode Parent)
 {
     parentBlock = Parent;
     graph.SetParentBlock(Parent);
     first.SetParentBlock(Parent);
     second.SetParentBlock(Parent);
     Res.SetParentBlock(Parent);
 }
Esempio n. 2
0
 public override void SetParentBlock(BlockNode Parent)
 {
     parentBlock = Parent;
     AssignedVariable.SetParentBlock(Parent);
     if (RightPart != null)
     {
         RightPart.SetParentBlock(Parent);
     }
 }
Esempio n. 3
0
 public override void SetParentBlock(BlockNode Parent)
 {
     parentBlock = Parent;
     FirstOperand.SetParentBlock(Parent);
     if (!IsUnary)
     {
         SecondOperand.SetParentBlock(Parent);
     }
 }
Esempio n. 4
0
 public CycleOperator(bool IsPred, AtomNode Cond, int numLine)//конструктор для цикла while
 {
     BeginningActivity = null;
     ContinueCondition = Cond;
     IterationActivity = null;
     IsPredCondition   = IsPred;
     Cond.SetParentBlock(this);
     TypeOfNode = NodeType.CycleOperator;
     LineNumber = numLine;
 }
Esempio n. 5
0
 public ConditionalOperatorNode(AtomNode ConditionNode, int numLine, ConditionalBranchNode If) //создание узла без ветки else
 {
     Condition = ConditionNode;                                                                //ссылка на узел-условие (на переменную, константу или последнее действие выражения)
     ConditionNode.SetParentBlock(this);
     ChildrenOperators = new List <Node>();
     TypeOfNode        = NodeType.ConditionalOperator;
     LineNumber        = numLine;
     IfBranch          = If;
     ElseBranch        = null;
     If.SetParentBlock(this);
     ExistedElse = false;
 }
Esempio n. 6
0
        public bool IsPredCondition;                                                            //true - c предусловием, false - с постусловием

        public CycleOperator(List <AtomNode> Beg, AtomNode Cond, AtomNode IterAct, int numLine) //конструктор для цикла for
        {
            BeginningActivity = Beg;
            ContinueCondition = Cond;
            IterationActivity = IterAct;
            IsPredCondition   = true;

            foreach (var oper in Beg)
            {
                oper.SetParentBlock(this);
            }
            Cond.SetParentBlock(this);
            IterAct.SetParentBlock(this);
            TypeOfNode = NodeType.CycleOperator;
            LineNumber = numLine;
        }
Esempio n. 7
0
 public override void SetParentBlock(BlockNode Parent)
 {
     parentBlock = Parent;
     WriteVariable.SetParentBlock(Parent);
 }
Esempio n. 8
0
 public override void SetParentBlock(BlockNode Parent)
 {
     parentBlock = Parent;
     outVariable.SetParentBlock(Parent);
     graph.SetParentBlock(Parent);
 }
Esempio n. 9
0
 public override void SetParentBlock(BlockNode Parent)
 {
     parentBlock = Parent;
     outGraph.SetParentBlock(Parent);
     inGraph.SetParentBlock(Parent);
 }
Esempio n. 10
0
 public override void SetParentBlock(BlockNode Parent)
 {
     parentBlock = Parent;
     InputVar.SetParentBlock(Parent);
     graph.SetParentBlock(Parent);
 }