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/PLANNING.md b/PLANNING.md index 50002af..04b85dd 100644 --- a/PLANNING.md +++ b/PLANNING.md @@ -31,7 +31,7 @@ _Academic first semester 2024-2025_ # Week 3: -- :hammer: Lab 2: Thursday 23/09/2023, 13h30-15h30. Room E001 (Samuel Humeau & Emma Nardino) +- :hammer: Lab 2: Thursday 23/09/2023, 13h30-15h30. Room E001 103 & -138 (Grenat) (Samuel Humeau & Emma Nardino) * Lexing & Parsing with ANTLR4 [TP02](TP02/tp2.pdf). * Code in [TP02/](TP02/). @@ -41,3 +41,13 @@ _Academic first semester 2024-2025_ * Interpreters: [transparents](course/capmif_cours03_interpreters.pdf). * 3 Address code generation: [transparents](course/capmif_cours05_3ad_codegen.pdf). +# Week 4: + +- hammer: Lab 3: Monday 30/09/2024, 13h30-15h30. Room E001 (Samuel Humeau & Emma Nardino) + + * Interpreter & Typer [TP03](TP03/tp3.pdf). + * Code in [TP03/](TP03/) and [MiniC/TP03/](MiniC/TP03/). + +- :book: Course: Thursday 3/10/2024, 10h15-12h15. Amphi B (Gabriel Radanne) + + * CFG [slides in english](course/capmif_cours06_irs.pdf). 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 diff --git a/course/capmif_cours06_irs.pdf b/course/capmif_cours06_irs.pdf new file mode 100644 index 0000000..24542ed Binary files /dev/null and b/course/capmif_cours06_irs.pdf differ