// Path: language/src/com/infdot/analysis/language/expression/visitor/AbstractExpressionVisitor.java
// public abstract class AbstractExpressionVisitor<V> {
// 	
// 	public abstract V visitConstant(Constant constant);
// 	
// 	public abstract V visitDiv(Div div, V e1, V e2);
// 	
// 	public abstract V visitGt(Gt gt, V e1, V e2);
// 	
// 	public abstract V visitIdentifier(Identifier identifier);
// 	
// 	public abstract V visitInput(Input input);
// 	
// 	public abstract V visitSub(Sub sub, V e1, V e2);
// }


import java.util.Set;
import com.infdot.analysis.language.expression.visitor.AbstractExpressionVisitor;
		this.e2 = new Identifier(name2);
	}

	public final Expression getE1() {
		return e1;
	}

	public final Expression getE2() {
		return e2;
	}

	@Override
	public final void collectVariables(Set<Identifier> variables) {
		e1.collectVariables(variables);
		e2.collectVariables(variables);
	}
	
	@Override
	public final String toString() {
		return e1 + op + e2;
	}

	@Override
	public final <V> V visit(AbstractExpressionVisitor<V> visitor) {
		return visitOperator(visitor, e1.visit(visitor), e2.visit(visitor));
	}
	
	/**
	 * Base classes must override this for doing work at the node.
	 */
// Path: language/src/com/infdot/analysis/language/expression/visitor/AbstractExpressionVisitor.java
// public abstract class AbstractExpressionVisitor<V> {
// 	
// 	public abstract V visitConstant(Constant constant);
// 	
// 	public abstract V visitDiv(Div div, V e1, V e2);
// 	
// 	public abstract V visitGt(Gt gt, V e1, V e2);
// 	
// 	public abstract V visitIdentifier(Identifier identifier);
// 	
// 	public abstract V visitInput(Input input);
// 	
// 	public abstract V visitSub(Sub sub, V e1, V e2);
// }


// Path: language/src/com/infdot/analysis/language/expression/AbstractBinaryOperator.java
import java.util.Set;
import com.infdot.analysis.language.expression.visitor.AbstractExpressionVisitor;

		this.e2 = new Identifier(name2);
	}

	public final Expression getE1() {
		return e1;
	}

	public final Expression getE2() {
		return e2;
	}

	@Override
	public final void collectVariables(Set<Identifier> variables) {
		e1.collectVariables(variables);
		e2.collectVariables(variables);
	}
	
	@Override
	public final String toString() {
		return e1 + op + e2;
	}

	@Override
	public final <V> V visit(AbstractExpressionVisitor<V> visitor) {
		return visitOperator(visitor, e1.visit(visitor), e2.visit(visitor));
	}
	
	/**
	 * Base classes must override this for doing work at the node.
	 */
	protected abstract <V> V visitOperator(AbstractExpressionVisitor<V> visitor, V e1, V e2);