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

            return null;
        }
Ejemplo n.º 4
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 6
0
        public virtual Object GetIn(Node node)
        {
            if(inhash == null)
            {
            return null;
            }

            return inhash[node];
        }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 9
0
 public virtual void DefaultOut(Node node)
 {
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 11
0
 internal abstract void ReplaceChild(Node oldChild, Node newChild);
Ejemplo n.º 12
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _ifelse_ == oldChild )
     {
     SetIfelse ((PIfelse) newChild);
     return;
     }
 }
Ejemplo n.º 13
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _test_ == oldChild )
     {
     SetTest ((PTest) newChild);
     return;
     }
 }
Ejemplo n.º 14
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _function_ == oldChild )
     {
     SetFunction ((PFunction) newChild);
     return;
     }
 }
Ejemplo n.º 15
0
 internal override void RemoveChild(Node child)
 {
     if ( _function_ == child )
     {
     _function_ = null;
     return;
     }
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 17
0
 internal void Parent(Node parent_node)
 {
     this.parent_node = parent_node;
 }
Ejemplo n.º 18
0
        protected string ToString(Node node)
        {
            if(node != null)
            {
            return node.ToString();
            }

            return "";
        }
Ejemplo n.º 19
0
 internal abstract void RemoveChild(Node child);
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 22
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _mult_ == oldChild )
     {
     SetMult ((PMult) newChild);
     return;
     }
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 24
0
 internal override void ReplaceChild(Node oldChild, Node newChild)
 {
     if ( _add_ == oldChild )
     {
     SetAdd ((PAdd) newChild);
     return;
     }
 }
Ejemplo n.º 25
0
 public virtual void DefaultIn(Node node)
 {
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 27
0
 public virtual void DefaultCase(Node node)
 {
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 29
0
        public virtual Object GetOut(Node node)
        {
            if(outhash == null)
            {
            return null;
            }

            return outhash[node];
        }
Ejemplo n.º 30
0
 internal override void RemoveChild(Node child)
 {
 }