?? aalts.java
字號(hào):
/* 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 AAlts extends PAlts{ private PAlt _alt_; private final LinkedList _alts_ = new TypedLinkedList(new Alts_Cast()); public AAlts() {} public AAlts( PAlt _alt_, List _alts_) { setAlt(_alt_); { this._alts_.clear(); this._alts_.addAll(_alts_); } } public AAlts( PAlt _alt_, XPAltsTail _alts_) { setAlt(_alt_); if(_alts_ != null) { while(_alts_ instanceof X1PAltsTail) { this._alts_.addFirst(((X1PAltsTail) _alts_).getPAltsTail()); _alts_ = ((X1PAltsTail) _alts_).getXPAltsTail(); } this._alts_.addFirst(((X2PAltsTail) _alts_).getPAltsTail()); } } public Object clone() { return new AAlts( (PAlt) cloneNode(_alt_), cloneList(_alts_)); } public void apply(Switch sw) { ((Analysis) sw).caseAAlts(this); } public PAlt getAlt() { return _alt_; } public void setAlt(PAlt node) { if(_alt_ != null) { _alt_.parent(null); } if(node != null) { if(node.parent() != null) { node.parent().removeChild(node); } node.parent(this); } _alt_ = node; } public LinkedList getAlts() { return _alts_; } public void setAlts(List list) { _alts_.clear(); _alts_.addAll(list); } public String toString() { return "" + toString(_alt_) + toString(_alts_); } void removeChild(Node child) { if(_alt_ == child) { _alt_ = null; return; } if(_alts_.remove(child)) { return; } } void replaceChild(Node oldChild, Node newChild) { if(_alt_ == oldChild) { setAlt((PAlt) newChild); return; } for(ListIterator i = _alts_.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 Alts_Cast implements Cast { public Object cast(Object o) { PAltsTail node = (PAltsTail) o; if((node.parent() != null) && (node.parent() != AAlts.this)) { node.parent().removeChild(node); } if((node.parent() == null) || (node.parent() != AAlts.this)) { node.parent(AAlts.this); } return node; } }}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -