1 /*******************************************************************************
\r
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
\r
3 * in Industry THTH ry.
\r
4 * All rights reserved. This program and the accompanying materials
\r
5 * are made available under the terms of the Eclipse Public License v1.0
\r
6 * which accompanies this distribution, and is available at
\r
7 * http://www.eclipse.org/legal/epl-v10.html
\r
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 /* This file was generated by SableCC (http://www.sablecc.org/). */
\r
14 package org.simantics.spreadsheet.common.expression.node;
\r
16 import org.simantics.spreadsheet.common.expression.analysis.*;
\r
18 @SuppressWarnings("nls")
\r
19 public final class AAddressValue extends PValue
\r
21 private TAmpersand _ampersand_;
\r
22 private PRange _range_;
\r
24 public AAddressValue()
\r
29 public AAddressValue(
\r
30 @SuppressWarnings("hiding") TAmpersand _ampersand_,
\r
31 @SuppressWarnings("hiding") PRange _range_)
\r
34 setAmpersand(_ampersand_);
\r
41 public Object clone()
\r
43 return new AAddressValue(
\r
44 cloneNode(this._ampersand_),
\r
45 cloneNode(this._range_));
\r
48 public void apply(Switch sw)
\r
50 ((Analysis) sw).caseAAddressValue(this);
\r
53 public TAmpersand getAmpersand()
\r
55 return this._ampersand_;
\r
58 public void setAmpersand(TAmpersand node)
\r
60 if(this._ampersand_ != null)
\r
62 this._ampersand_.parent(null);
\r
67 if(node.parent() != null)
\r
69 node.parent().removeChild(node);
\r
75 this._ampersand_ = node;
\r
78 public PRange getRange()
\r
80 return this._range_;
\r
83 public void setRange(PRange node)
\r
85 if(this._range_ != null)
\r
87 this._range_.parent(null);
\r
92 if(node.parent() != null)
\r
94 node.parent().removeChild(node);
\r
100 this._range_ = node;
\r
104 public String toString()
\r
107 + toString(this._ampersand_)
\r
108 + toString(this._range_);
\r
112 void removeChild(@SuppressWarnings("unused") Node child)
\r
115 if(this._ampersand_ == child)
\r
117 this._ampersand_ = null;
\r
121 if(this._range_ == child)
\r
123 this._range_ = null;
\r
127 throw new RuntimeException("Not a child.");
\r
131 void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
\r
134 if(this._ampersand_ == oldChild)
\r
136 setAmpersand((TAmpersand) newChild);
\r
140 if(this._range_ == oldChild)
\r
142 setRange((PRange) newChild);
\r
146 throw new RuntimeException("Not a child.");
\r