1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 /* This file was generated by SableCC (http://www.sablecc.org/). */
14 package org.simantics.spreadsheet.common.expression.node;
16 import org.simantics.spreadsheet.common.expression.analysis.*;
18 @SuppressWarnings("nls")
19 public final class AMultExpression extends PExpression
21 private PMultiplicative _multiplicative_;
23 public AMultExpression()
28 public AMultExpression(
29 @SuppressWarnings("hiding") PMultiplicative _multiplicative_)
32 setMultiplicative(_multiplicative_);
39 return new AMultExpression(
40 cloneNode(this._multiplicative_));
43 public void apply(Switch sw)
45 ((Analysis) sw).caseAMultExpression(this);
48 public PMultiplicative getMultiplicative()
50 return this._multiplicative_;
53 public void setMultiplicative(PMultiplicative node)
55 if(this._multiplicative_ != null)
57 this._multiplicative_.parent(null);
62 if(node.parent() != null)
64 node.parent().removeChild(node);
70 this._multiplicative_ = node;
74 public String toString()
77 + toString(this._multiplicative_);
81 void removeChild(@SuppressWarnings("unused") Node child)
84 if(this._multiplicative_ == child)
86 this._multiplicative_ = null;
90 throw new RuntimeException("Not a child.");
94 void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
97 if(this._multiplicative_ == oldChild)
99 setMultiplicative((PMultiplicative) newChild);
103 throw new RuntimeException("Not a child.");