/* This file was generated by SableCC (http://www.sablecc.org/). */
package org.sablecc.sablecc.node;
import org.sablecc.sablecc.analysis.*;
@SuppressWarnings("nls")
public final class ARegExpBasic extends PBasic {
private PRegExp _regExp_;
public ARegExpBasic() {
// Constructor
}
public ARegExpBasic(
@SuppressWarnings("hiding") PRegExp _regExp_) {
// Constructor
setRegExp(_regExp_);
}
@Override
public Object clone() {
return new ARegExpBasic(
cloneNode(this._regExp_));
}
@Override
public void apply(Switch sw) {
((Analysis) sw).caseARegExpBasic(this);
}
public PRegExp getRegExp() {
return this._regExp_;
}
public void setRegExp(PRegExp node) {
if (this._regExp_ != null) {
this._regExp_.parent(null);
}
if (node != null) {
if (node.parent() != null) {
node.parent().removeChild(node);
}
node.parent(this);
}
this._regExp_ = node;
}
@Override
public String toString() {
return ""
+ toString(this._regExp_);
}
@Override
void removeChild(@SuppressWarnings("unused") Node child) {
// Remove child
if (this._regExp_ == child) {
this._regExp_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild) {
// Replace child
if (this._regExp_ == oldChild) {
setRegExp((PRegExp) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
}