prerna.sablecc.node.Start Maven / Gradle / Ivy
/* This file was generated by SableCC (http://www.sablecc.org/). */
package prerna.sablecc.node;
import prerna.sablecc.analysis.*;
@SuppressWarnings("nls")
public final class Start extends Node
{
private PConfiguration _pConfiguration_;
private EOF _eof_;
public Start()
{
// Empty body
}
public Start(
@SuppressWarnings("hiding") PConfiguration _pConfiguration_,
@SuppressWarnings("hiding") EOF _eof_)
{
setPConfiguration(_pConfiguration_);
setEOF(_eof_);
}
@Override
public Object clone()
{
return new Start(
cloneNode(this._pConfiguration_),
cloneNode(this._eof_));
}
@Override
public void apply(Switch sw)
{
((Analysis) sw).caseStart(this);
}
public PConfiguration getPConfiguration()
{
return this._pConfiguration_;
}
public void setPConfiguration(PConfiguration node)
{
if(this._pConfiguration_ != null)
{
this._pConfiguration_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._pConfiguration_ = node;
}
public EOF getEOF()
{
return this._eof_;
}
public void setEOF(EOF node)
{
if(this._eof_ != null)
{
this._eof_.parent(null);
}
if(node != null)
{
if(node.parent() != null)
{
node.parent().removeChild(node);
}
node.parent(this);
}
this._eof_ = node;
}
@Override
void removeChild(Node child)
{
if(this._pConfiguration_ == child)
{
this._pConfiguration_ = null;
return;
}
if(this._eof_ == child)
{
this._eof_ = null;
return;
}
throw new RuntimeException("Not a child.");
}
@Override
void replaceChild(Node oldChild, Node newChild)
{
if(this._pConfiguration_ == oldChild)
{
setPConfiguration((PConfiguration) newChild);
return;
}
if(this._eof_ == oldChild)
{
setEOF((EOF) newChild);
return;
}
throw new RuntimeException("Not a child.");
}
@Override
public String toString()
{
return "" +
toString(this._pConfiguration_) +
toString(this._eof_);
}
}