add 1 not ok, dont come back with result
This commit is contained in:
@@ -1,36 +1,47 @@
|
||||
package TP2.asd;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import TP2.asd.Program.*;
|
||||
|
||||
public interface Interface{
|
||||
public interface Expression {
|
||||
public <H,S> S accept(ExprVisitor<H,S> v, H h);
|
||||
}
|
||||
|
||||
public interface Interface{
|
||||
public interface ProgramI {
|
||||
public <H,S> S accept(ProgramVisitor<H,S> v, H h);
|
||||
}
|
||||
public interface Function {
|
||||
public <H,S> S accept(FunctionVisitor<H,S> v, H h);
|
||||
}
|
||||
public interface Instruction {
|
||||
public <H,S> S accept(InstrVisitor<H,S> v, H h);
|
||||
}
|
||||
|
||||
public interface Expression {
|
||||
public <H,S> S accept(ExprVisitor<H,S> v, H h);
|
||||
}
|
||||
|
||||
public interface ProgramVisitor<H,S> {
|
||||
public S visitProgram(ProgramImp p, H h);
|
||||
public S visitFunction(Function f, H h);
|
||||
public S visitProgram(ProgramImp programImp, H h);
|
||||
}
|
||||
|
||||
public interface FunctionVisitor<H,S> {
|
||||
public S visitFunction(FunctionImp e, H h);
|
||||
}
|
||||
|
||||
public interface InstrVisitor<H,S>{
|
||||
public S visitReturn(Return_instr e, H h);
|
||||
public S visitReturn(Return_instrImp e, H h);
|
||||
}
|
||||
|
||||
public interface ExprVisitor<H,S> {
|
||||
public S visitConst(Const e,H h);
|
||||
public S visitBinOp(BinopExpression e, H h);
|
||||
public S visitConst(ConstImp e,H h);
|
||||
public S visitBinOp(BinopExpressionImp e, H h);
|
||||
}
|
||||
|
||||
public interface Type{
|
||||
public String prettyprinter();
|
||||
}
|
||||
|
||||
public enum Op {PLUS, MINUS, TIMES, DIV}
|
||||
public enum Op {PLUS, MINUS, TIMES, DIV,MOD}
|
||||
|
||||
//Eval
|
||||
public interface ExprEval extends ExprVisitor<Map<String, Integer>, Integer> {
|
||||
|
||||
Reference in New Issue
Block a user