// ** This class was generated with DemFGen (vers:09/27/2009)

package gen;

import edu.neu.ccs.demeterf.lib.*;
import edu.neu.ccs.demeterf.*;
import edu.neu.ccs.demeterf.lib.*;




/** Representation of Sub */
public class Sub extends Oper{

    /** Construct a(n) Sub Instance */
    public Sub(){
    }
    /** Is the given object Equal to this Sub? */
    public boolean equals(Object o){
        if(!(o instanceof Sub))return false;
        if(o == this)return true;
        Sub oo = (Sub)o;
        return true;
    }
    /** Parse an instance of Sub from the given String */
    public static Sub parse(String inpt) throws ParseException{
        return new TheParser(new java.io.StringReader(inpt)).parse_Sub();
    }
    /** Parse an instance of Sub from the given Stream */
    public static Sub parse(java.io.InputStream inpt) throws ParseException{
        return new TheParser(inpt).parse_Sub();
    }
    /** Parse an instance of Sub from the given Reader */
    public static Sub parse(java.io.Reader inpt) throws ParseException{
        return new TheParser(inpt).parse_Sub();
    }


    public int eval(int l, int r){ return l-r; }
    public List<Op> compile(List<ident> env){
        return List.<Op>create(new Minus());
    }
    public <X> X accept(Vis<X> v){ return v.visit(this); }
    public boolean isSub(){ return true; }
 
    /** DGP method from Class Print */
    public String print(){ return gen.Print.PrintM(this); }

}