blob: c6f30c15597ce59403c8ec12c053e16e1b145c50 [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 132: AsmRulesOptAST ::= $Empty
*</em>
*<p>
*<b>
*<li>Rule 133: AsmRulesOptAST ::= AsmRulesOptAST AsmRuleAST
*</b>
*/
public class AsmRulesOptAST extends ASTNode implements IAsmRulesOptAST
{
private AsmRulesOptAST _AsmRulesOptAST;
private IAsmRuleAST _AsmRuleAST;
/**
* The value returned by <b>getAsmRulesOptAST</b> may be <b>null</b>
*/
public AsmRulesOptAST getAsmRulesOptAST() { return _AsmRulesOptAST; }
public IAsmRuleAST getAsmRuleAST() { return _AsmRuleAST; }
public AsmRulesOptAST(IToken leftIToken, IToken rightIToken,
AsmRulesOptAST _AsmRulesOptAST,
IAsmRuleAST _AsmRuleAST)
{
super(leftIToken, rightIToken);
this._AsmRulesOptAST = _AsmRulesOptAST;
if (_AsmRulesOptAST != null) ((ASTNode) _AsmRulesOptAST).setParent(this);
this._AsmRuleAST = _AsmRuleAST;
((ASTNode) _AsmRuleAST).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 AsmRulesOptAST)) return false;
AsmRulesOptAST other = (AsmRulesOptAST) o;
if (_AsmRulesOptAST == null && other.getAsmRulesOptAST() != null) return false;
else if (! _AsmRulesOptAST.equals(other.getAsmRulesOptAST())) return false;
if (! _AsmRuleAST.equals(other.getAsmRuleAST())) return false;
return true;
}
public int hashCode()
{
int hash = 7;
hash = hash * 31 + (getAsmRulesOptAST() == null ? 0 : getAsmRulesOptAST().hashCode());
hash = hash * 31 + (getAsmRuleAST().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); }
}