Beispiel #1
0
 public void ReplaceBy(Node node)
 {
     if(parent_node != null)
     {
     parent_node.ReplaceChild(this, node);
     }
 }
Beispiel #2
0
 internal override void RemoveChild(Node child)
 {
     if ( _mult_ == child )
     {
     _mult_ = null;
     return;
     }
 }
Beispiel #3
0
        protected Node CloneNode(Node node)
        {
            if(node != null)
            {
            return (Node) node.Clone();
            }

            return null;
        }
Beispiel #4
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
 }
Beispiel #5
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _keyword_func_ == oldChild )
     {
     SetKeywordFunc ((TKeywordFunc) newChild);
     return;
     }
     if ( _operator_opening_parenthesis_ == oldChild )
     {
     SetOperatorOpeningParenthesis ((TOperatorOpeningParenthesis) newChild);
     return;
     }
     if ( _operator_closing_parenthesis_ == oldChild )
     {
     SetOperatorClosingParenthesis ((TOperatorClosingParenthesis) newChild);
     return;
     }
     if ( _type_ == oldChild )
     {
     SetType ((PType) newChild);
     return;
     }
     if ( _block_ == oldChild )
     {
     SetBlock ((PBlock) newChild);
     return;
     }
 }
Beispiel #6
0
        public virtual Object GetIn(Node node)
        {
            if(inhash == null)
            {
            return null;
            }

            return inhash[node];
        }
Beispiel #7
0
 internal override void RemoveChild(Node child)
 {
     if ( _keyword_func_ == child )
     {
     _keyword_func_ = null;
     return;
     }
     if ( _operator_opening_parenthesis_ == child )
     {
     _operator_opening_parenthesis_ = null;
     return;
     }
     if ( _operator_closing_parenthesis_ == child )
     {
     _operator_closing_parenthesis_ = null;
     return;
     }
     if ( _type_ == child )
     {
     _type_ = null;
     return;
     }
     if ( _block_ == child )
     {
     _block_ = null;
     return;
     }
 }
Beispiel #8
0
 internal override void RemoveChild(Node child)
 {
     if ( _keyword_func_ == child )
     {
     _keyword_func_ = null;
     return;
     }
     if ( _identifier_ == child )
     {
     _identifier_ = null;
     return;
     }
     if ( _operator_opening_parenthesis_ == child )
     {
     _operator_opening_parenthesis_ = null;
     return;
     }
     if ( _parameterlist_ == child )
     {
     _parameterlist_ = null;
     return;
     }
     if ( _operator_closing_parenthesis_ == child )
     {
     _operator_closing_parenthesis_ = null;
     return;
     }
     if ( _block_ == child )
     {
     _block_ = null;
     return;
     }
 }
Beispiel #9
0
 public virtual void DefaultOut(Node node)
 {
 }
Beispiel #10
0
 internal override void RemoveChild(Node child)
 {
     if ( _keyword_if_ == child )
     {
     _keyword_if_ = null;
     return;
     }
     if ( _ifexpr_ == child )
     {
     _ifexpr_ = null;
     return;
     }
     if ( _block_ == child )
     {
     _block_ = null;
     return;
     }
 }
Beispiel #11
0
 internal abstract void ReplaceChild(Node oldChild, Node newChild);
Beispiel #12
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _ifelse_ == oldChild )
     {
     SetIfelse ((PIfelse) newChild);
     return;
     }
 }
Beispiel #13
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _test_ == oldChild )
     {
     SetTest ((PTest) newChild);
     return;
     }
 }
Beispiel #14
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _function_ == oldChild )
     {
     SetFunction ((PFunction) newChild);
     return;
     }
 }
Beispiel #15
0
 internal override void RemoveChild(Node child)
 {
     if ( _function_ == child )
     {
     _function_ = null;
     return;
     }
 }
Beispiel #16
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _keyword_func_ == oldChild )
     {
     SetKeywordFunc ((TKeywordFunc) newChild);
     return;
     }
     if ( _identifier_ == oldChild )
     {
     SetIdentifier ((TIdentifier) newChild);
     return;
     }
     if ( _operator_opening_parenthesis_ == oldChild )
     {
     SetOperatorOpeningParenthesis ((TOperatorOpeningParenthesis) newChild);
     return;
     }
     if ( _parameterlist_ == oldChild )
     {
     SetParameterlist ((PParameterlist) newChild);
     return;
     }
     if ( _operator_closing_parenthesis_ == oldChild )
     {
     SetOperatorClosingParenthesis ((TOperatorClosingParenthesis) newChild);
     return;
     }
     if ( _block_ == oldChild )
     {
     SetBlock ((PBlock) newChild);
     return;
     }
 }
Beispiel #17
0
 internal void Parent(Node parent_node)
 {
     this.parent_node = parent_node;
 }
Beispiel #18
0
        protected string ToString(Node node)
        {
            if(node != null)
            {
            return node.ToString();
            }

            return "";
        }
Beispiel #19
0
 internal abstract void RemoveChild(Node child);
Beispiel #20
0
        public virtual void SetOut(Node node, Object outobj)
        {
            if(this.outhash == null)
            {
            this.outhash = new Hashtable(1);
            }

            if(outobj != null)
            {
            this.outhash[node] = outobj;
            }
            else
            {
            this.outhash.Remove(node);
            }
        }
Beispiel #21
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _keyword_if_ == oldChild )
     {
     SetKeywordIf ((TKeywordIf) newChild);
     return;
     }
     if ( _ifexpr_ == oldChild )
     {
     SetIfexpr ((PIfexpr) newChild);
     return;
     }
     if ( _block_ == oldChild )
     {
     SetBlock ((PBlock) newChild);
     return;
     }
 }
Beispiel #22
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _mult_ == oldChild )
     {
     SetMult ((PMult) newChild);
     return;
     }
 }
Beispiel #23
0
        public virtual void SetIn(Node node, Object inobj)
        {
            if(this.inhash == null)
            {
            this.inhash = new Hashtable(1);
            }

            if(inobj != null)
            {
            this.inhash[node] = inobj;
            }
            else
            {
            this.inhash.Remove(node);
            }
        }
Beispiel #24
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _add_ == oldChild )
     {
     SetAdd ((PAdd) newChild);
     return;
     }
 }
Beispiel #25
0
 public virtual void DefaultIn(Node node)
 {
 }
Beispiel #26
0
 internal override void RemoveChild(Node child)
 {
     if ( _if_ == child )
     {
     _if_ = null;
     return;
     }
     if ( _elif_ == child )
     {
     _elif_ = null;
     return;
     }
     if ( _else_ == child )
     {
     _else_ = null;
     return;
     }
 }
Beispiel #27
0
 public virtual void DefaultCase(Node node)
 {
 }
Beispiel #28
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _if_ == oldChild )
     {
     SetIf ((PIf) newChild);
     return;
     }
     if ( _elif_ == oldChild )
     {
     SetElif ((PElif) newChild);
     return;
     }
     if ( _else_ == oldChild )
     {
     SetElse ((PElse) newChild);
     return;
     }
 }
Beispiel #29
0
        public virtual Object GetOut(Node node)
        {
            if(outhash == null)
            {
            return null;
            }

            return outhash[node];
        }
Beispiel #30
0
 internal override void RemoveChild(Node child)
 {
 }