⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aproductions.java

📁 有关编译器的编译器.
💻 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 AProductions extends PProductions{  private TProductions _productions_;  private final LinkedList _prods_ = new TypedLinkedList(new Prods_Cast());  public AProductions()  {}  public AProductions(    TProductions _productions_,    List _prods_)  {    setProductions(_productions_);    {      this._prods_.clear();      this._prods_.addAll(_prods_);    }  }  public AProductions(    TProductions _productions_,    XPProd _prods_)  {    setProductions(_productions_);    if(_prods_ != null)    {      while(_prods_ instanceof X1PProd)      {        this._prods_.addFirst(((X1PProd) _prods_).getPProd());        _prods_ = ((X1PProd) _prods_).getXPProd();      }      this._prods_.addFirst(((X2PProd) _prods_).getPProd());    }  }  public Object clone()  {    return new AProductions(             (TProductions) cloneNode(_productions_),             cloneList(_prods_));  }  public void apply(Switch sw)  {    ((Analysis) sw).caseAProductions(this);  }  public TProductions getProductions()  {    return _productions_;  }  public void setProductions(TProductions node)  {    if(_productions_ != null)    {      _productions_.parent(null);    }    if(node != null)    {      if(node.parent() != null)      {        node.parent().removeChild(node);      }      node.parent(this);    }    _productions_ = node;  }  public LinkedList getProds()  {    return _prods_;  }  public void setProds(List list)  {    _prods_.clear();    _prods_.addAll(list);  }  public String toString()  {    return ""           + toString(_productions_)           + toString(_prods_);  }  void removeChild(Node child)  {    if(_productions_ == child)    {      _productions_ = null;      return;    }    if(_prods_.remove(child))    {      return;    }  }  void replaceChild(Node oldChild, Node newChild)  {    if(_productions_ == oldChild)    {      setProductions((TProductions) newChild);      return;    }    for(ListIterator i = _prods_.listIterator(); i.hasNext();)    {      if(i.next() == oldChild)      {        if(newChild != null)        {          i.set(newChild);          oldChild.parent(null);          return;        }        i.remove();        oldChild.parent(null);        return;      }    }  }  private class Prods_Cast implements Cast  {    public Object cast(Object o)    {      PProd node = (PProd) o;      if((node.parent() != null) &&          (node.parent() != AProductions.this))      {        node.parent().removeChild(node);      }      if((node.parent() == null) ||          (node.parent() != AProductions.this))      {        node.parent(AProductions.this);      }      return node;    }  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -