diff --git a/MiniC/TP03/MiniCInterpretVisitor.py b/MiniC/TP03/MiniCInterpretVisitor.py index c9716f6..f1571d8 100644 --- a/MiniC/TP03/MiniCInterpretVisitor.py +++ b/MiniC/TP03/MiniCInterpretVisitor.py @@ -114,12 +114,8 @@ class MiniCInterpretVisitor(MiniCVisitor): if ctx.myop.type == MiniCParser.MULT: return lval * rval elif ctx.myop.type == MiniCParser.DIV: - if rval == 0: - raise MiniCRuntimeError("Division by 0") - if isinstance(lval, int): - return lval // rval - else: - return lval / rval + # TODO : interpret division + raise NotImplementedError() elif ctx.myop.type == MiniCParser.MOD: # TODO : interpret modulo raise NotImplementedError() diff --git a/TP03/tp3.pdf b/TP03/tp3.pdf index 84a6c46..01f6575 100644 Binary files a/TP03/tp3.pdf and b/TP03/tp3.pdf differ