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

📄 aidlist.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 AIdList extends PIdList{  private TId _id_;  private final LinkedList _ids_ = new TypedLinkedList(new Ids_Cast());  public AIdList()  {}  public AIdList(    TId _id_,    List _ids_)  {    setId(_id_);    {      this._ids_.clear();      this._ids_.addAll(_ids_);    }  }  public AIdList(    TId _id_,    XPIdListTail _ids_)  {    setId(_id_);    if(_ids_ != null)    {      while(_ids_ instanceof X1PIdListTail)      {        this._ids_.addFirst(((X1PIdListTail) _ids_).getPIdListTail());        _ids_ = ((X1PIdListTail) _ids_).getXPIdListTail();      }      this._ids_.addFirst(((X2PIdListTail) _ids_).getPIdListTail());    }  }  public Object clone()  {    return new AIdList(             (TId) cloneNode(_id_),             cloneList(_ids_));  }  public void apply(Switch sw)  {    ((Analysis) sw).caseAIdList(this);  }  public TId getId()  {    return _id_;  }  public void setId(TId node)  {    if(_id_ != null)    {      _id_.parent(null);    }    if(node != null)    {      if(node.parent() != null)      {        node.parent().removeChild(node);      }      node.parent(this);    }    _id_ = node;  }  public LinkedList getIds()  {    return _ids_;  }  public void setIds(List list)  {    _ids_.clear();    _ids_.addAll(list);  }  public String toString()  {    return ""           + toString(_id_)           + toString(_ids_);  }  void removeChild(Node child)  {    if(_id_ == child)    {      _id_ = null;      return;    }    if(_ids_.remove(child))    {      return;    }  }  void replaceChild(Node oldChild, Node newChild)  {    if(_id_ == oldChild)    {      setId((TId) newChild);      return;    }    for(ListIterator i = _ids_.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 Ids_Cast implements Cast  {    public Object cast(Object o)    {      PIdListTail node = (PIdListTail) o;      if((node.parent() != null) &&          (node.parent() != AIdList.this))      {        node.parent().removeChild(node);      }      if((node.parent() == null) ||          (node.parent() != AIdList.this))      {        node.parent(AIdList.this);      }      return node;    }  }}

⌨️ 快捷键说明

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