Merge branch 'main' of https://github.com/Drup/cap-lab24.git
This commit is contained in:
commit
6a9701b16a
@ -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()
|
||||
|
12
PLANNING.md
12
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).
|
||||
|
BIN
TP03/tp3.pdf
BIN
TP03/tp3.pdf
Binary file not shown.
BIN
course/capmif_cours06_irs.pdf
Normal file
BIN
course/capmif_cours06_irs.pdf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user