blob: 0de2ff60d6b340a5801ef51eafd56a6816d2cbc8 [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.*;
/**
*<b>
*<li>Rule 188: IfRuleAST ::= if LPAREN LogicalTermAST RPAREN AsmRuleAST else AsmRuleAST
*</b>
*/
public class IfRuleAST1 extends ASTNode implements IIfRuleAST
{
private ILogicalTermAST _LogicalTermAST;
private IAsmRuleAST _AsmRuleAST;
private IAsmRuleAST _AsmRuleAST7;
public ILogicalTermAST getLogicalTermAST() { return _LogicalTermAST; }
public IAsmRuleAST getAsmRuleAST() { return _AsmRuleAST; }
public IAsmRuleAST getAsmRuleAST7() { return _AsmRuleAST7; }
public IfRuleAST1(IToken leftIToken, IToken rightIToken,
ILogicalTermAST _LogicalTermAST,
IAsmRuleAST _AsmRuleAST,
IAsmRuleAST _AsmRuleAST7)
{
super(leftIToken, rightIToken);
this._LogicalTermAST = _LogicalTermAST;
((ASTNode) _LogicalTermAST).setParent(this);
this._AsmRuleAST = _AsmRuleAST;
((ASTNode) _AsmRuleAST).setParent(this);
this._AsmRuleAST7 = _AsmRuleAST7;
((ASTNode) _AsmRuleAST7).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 IfRuleAST1)) return false;
IfRuleAST1 other = (IfRuleAST1) o;
if (! _LogicalTermAST.equals(other.getLogicalTermAST())) return false;
if (! _AsmRuleAST.equals(other.getAsmRuleAST())) return false;
if (! _AsmRuleAST7.equals(other.getAsmRuleAST7())) return false;
return true;
}
public int hashCode()
{
int hash = 7;
hash = hash * 31 + (getLogicalTermAST().hashCode());
hash = hash * 31 + (getAsmRuleAST().hashCode());
hash = hash * 31 + (getAsmRuleAST7().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); }
}