Logo Search packages:      
Sourcecode: sablecc version File versions  Download package

ARegExpTail.java

/* This file was generated by SableCC (http://www.sablecc.org/). */

package org.sablecc.sablecc.node;

import java.util.*;
import org.sablecc.sablecc.analysis.*;

public final class ARegExpTail extends PRegExpTail
{
  private TBar _bar_;
  private PConcat _concat_;

  public ARegExpTail()
  {}

  public ARegExpTail(
    TBar _bar_,
    PConcat _concat_)
  {
    setBar(_bar_);

    setConcat(_concat_);

  }
  public Object clone()
  {
    return new ARegExpTail(
             (TBar) cloneNode(_bar_),
             (PConcat) cloneNode(_concat_));
  }

  public void apply(Switch sw)
  {
    ((Analysis) sw).caseARegExpTail(this);
  }

  public TBar getBar()
  {
    return _bar_;
  }

  public void setBar(TBar node)
  {
    if(_bar_ != null)
    {
      _bar_.parent(null);
    }

    if(node != null)
    {
      if(node.parent() != null)
      {
        node.parent().removeChild(node);
      }

      node.parent(this);
    }

    _bar_ = node;
  }

  public PConcat getConcat()
  {
    return _concat_;
  }

  public void setConcat(PConcat node)
  {
    if(_concat_ != null)
    {
      _concat_.parent(null);
    }

    if(node != null)
    {
      if(node.parent() != null)
      {
        node.parent().removeChild(node);
      }

      node.parent(this);
    }

    _concat_ = node;
  }

  public String toString()
  {
    return ""
           + toString(_bar_)
           + toString(_concat_);
  }

  void removeChild(Node child)
  {
    if(_bar_ == child)
    {
      _bar_ = null;
      return;
    }

    if(_concat_ == child)
    {
      _concat_ = null;
      return;
    }

  }

  void replaceChild(Node oldChild, Node newChild)
  {
    if(_bar_ == oldChild)
    {
      setBar((TBar) newChild);
      return;
    }

    if(_concat_ == oldChild)
    {
      setConcat((PConcat) newChild);
      return;
    }

  }
}

Generated by  Doxygen 1.6.0   Back to index