blob: d6222cc8ff3b56e7a5e05a7219916b0983ab6d84 [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 80: RelationalTermAST ::= ArithmeticTermAST
*</em>
*<p>
*<b>
*<li>Rule 81: RelationalTermAST ::= RelationalTermAST RelationalOpAST ArithmeticTermAST
*</b>
*/
public class RelationalTermAST extends ASTNode implements IRelationalTermAST
{
private IRelationalTermAST _RelationalTermAST;
private RelationalOpAST _RelationalOpAST;
private IArithmeticTermAST _ArithmeticTermAST;
public IRelationalTermAST getRelationalTermAST() { return _RelationalTermAST; }
public RelationalOpAST getRelationalOpAST() { return _RelationalOpAST; }
public IArithmeticTermAST getArithmeticTermAST() { return _ArithmeticTermAST; }
public RelationalTermAST(IToken leftIToken, IToken rightIToken,
IRelationalTermAST _RelationalTermAST,
RelationalOpAST _RelationalOpAST,
IArithmeticTermAST _ArithmeticTermAST)
{
super(leftIToken, rightIToken);
this._RelationalTermAST = _RelationalTermAST;
((ASTNode) _RelationalTermAST).setParent(this);
this._RelationalOpAST = _RelationalOpAST;
((ASTNode) _RelationalOpAST).setParent(this);
this._ArithmeticTermAST = _ArithmeticTermAST;
((ASTNode) _ArithmeticTermAST).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 RelationalTermAST)) return false;
RelationalTermAST other = (RelationalTermAST) o;
if (! _RelationalTermAST.equals(other.getRelationalTermAST())) return false;
if (! _RelationalOpAST.equals(other.getRelationalOpAST())) return false;
if (! _ArithmeticTermAST.equals(other.getArithmeticTermAST())) return false;
return true;
}
public int hashCode()
{
int hash = 7;
hash = hash * 31 + (getRelationalTermAST().hashCode());
hash = hash * 31 + (getRelationalOpAST().hashCode());
hash = hash * 31 + (getArithmeticTermAST().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); }
}