blob: 274482247f16dc3bfd7738a5b70f0067008fcc68 [file] [log] [blame]
/**
* Copyright (c) 2007 - 2009 OptXware Research and Development LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Daniel Varro - Initial API and implementation
*
* This file was generated automatically based upon the VTCL LPG Parser
* VTCLParser.g
*/
package org.eclipse.viatra2.lpgparser.ast;
import lpg.lpgjavaruntime.*;
/**
*<em>
*<li>Rule 108: InitialValuesAST ::= InitialValueAST
*</em>
*<p>
*<b>
*<li>Rule 109: InitialValuesAST ::= InitialValuesAST InitialValueAST
*</b>
*/
public class InitialValuesAST extends ASTNode implements IInitialValuesAST
{
private IInitialValuesAST _InitialValuesAST;
private InitialValueAST _InitialValueAST;
public IInitialValuesAST getInitialValuesAST() { return _InitialValuesAST; }
public InitialValueAST getInitialValueAST() { return _InitialValueAST; }
public InitialValuesAST(IToken leftIToken, IToken rightIToken,
IInitialValuesAST _InitialValuesAST,
InitialValueAST _InitialValueAST)
{
super(leftIToken, rightIToken);
this._InitialValuesAST = _InitialValuesAST;
((ASTNode) _InitialValuesAST).setParent(this);
this._InitialValueAST = _InitialValueAST;
((ASTNode) _InitialValueAST).setParent(this);
initialize();
}
public boolean equals(Object o)
{
if (o == this) return true;
//
// The supers call is not required for now because Ast nodes
// can only extend the root Ast, AstToken and AstList and none
// of these nodes contain children.
//
// if (! super.equals(o)) return false;
//
if (! (o instanceof InitialValuesAST)) return false;
InitialValuesAST other = (InitialValuesAST) o;
if (! _InitialValuesAST.equals(other.getInitialValuesAST())) return false;
if (! _InitialValueAST.equals(other.getInitialValueAST())) return false;
return true;
}
public int hashCode()
{
int hash = 7;
hash = hash * 31 + (getInitialValuesAST().hashCode());
hash = hash * 31 + (getInitialValueAST().hashCode());
return hash;
}
public void accept(Visitor v) { v.visit(this); }
public void accept(ArgumentVisitor v, Object o) { v.visit(this, o); }
public Object accept(ResultVisitor v) { return v.visit(this); }
public Object accept(ResultArgumentVisitor v, Object o) { return v.visit(this, o); }
}