CAP/MiniC/README-interpreter.md

32 lines
902 B
Markdown
Raw Normal View History

2024-09-29 09:58:25 +02:00
# MiniC interpreter and typer
LAB3, MIF08 / CAP / CS444 2023-24
2024-09-29 09:58:25 +02:00
# Authors
2024-10-10 13:32:40 +02:00
Augustin LUCAS
2024-09-29 09:58:25 +02:00
# Contents
2024-10-10 13:32:40 +02:00
Extension implemented : Fortran-like for loops
2024-09-29 09:58:25 +02:00
# Howto
`make test-interpret TEST_FILES='TP03/tests/provided/examples/test_print_int.c'` for a single run
`make test` to test all the files in `*/tests/*` according to `EXPECTED` results.
You can select the files you want to test by using `make test TEST_FILES='TP03/**/*bad*.c'` (`**` means
"any number of possibly nested directories").
# Test design
2024-10-10 13:32:40 +02:00
Alongside all the tests designed to maximise the coverage, some tests are added to verify the correctness of the code on more advanced examples:
- `ext-for-fortran/test_imbricated_for.c`
- `base/test_fibonacci.c`
2024-09-29 09:58:25 +02:00
# Known bugs
2024-10-08 08:39:14 +02:00
- On a division by zero, the interpreter prints "Division by 0" message and returns 1.
This differs from certain versions of GCC. The test is therefore skipped.