blob: 9e9549d657f0495473650c42ea1b51cdbb1dd4ec [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 9: MachineContentsAST ::= MachineContentAST
*</em>
*<p>
*<b>
*<li>Rule 10: MachineContentsAST ::= MachineContentsAST MachineContentAST
*</b>
*/
public class MachineContentsAST extends ASTNode implements IMachineContentsAST
{
private IMachineContentsAST _MachineContentsAST;
private IMachineContentAST _MachineContentAST;
public IMachineContentsAST getMachineContentsAST() { return _MachineContentsAST; }
public IMachineContentAST getMachineContentAST() { return _MachineContentAST; }
public MachineContentsAST(IToken leftIToken, IToken rightIToken,
IMachineContentsAST _MachineContentsAST,
IMachineContentAST _MachineContentAST)
{
super(leftIToken, rightIToken);
this._MachineContentsAST = _MachineContentsAST;
((ASTNode) _MachineContentsAST).setParent(this);
this._MachineContentAST = _MachineContentAST;
((ASTNode) _MachineContentAST).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 MachineContentsAST)) return false;
MachineContentsAST other = (MachineContentsAST) o;
if (! _MachineContentsAST.equals(other.getMachineContentsAST())) return false;
if (! _MachineContentAST.equals(other.getMachineContentAST())) return false;
return true;
}
public int hashCode()
{
int hash = 7;
hash = hash * 31 + (getMachineContentsAST().hashCode());
hash = hash * 31 + (getMachineContentAST().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); }
}