This repository contains the source code for a Monty interpreter, which is capable of interpreting Monty ByteCodes files.
main.c
: Main entry point of the Monty interpreter.monty.h
: Header file containing function prototypes and data structure definitions.opr_add.c
: Implementation of theadd
opcode.opr_div.c
: Implementation of thediv
opcode.opr_free_stack.c
: Function to free the stack.opr_mul.c
: Implementation of themul
opcode.opr_pall.c
: Implementation of thepall
opcode.opr_pint.c
: Implementation of thepint
opcode.opr_pstr.c
: Implementation of thepstr
opcode.opr_queue.c
: Implementation of thequeue
opcode.opr_rotr.c
: Implementation of therotr
opcode.opr_sub.c
: Implementation of thesub
opcode.tests/
: Directory containing test cases for the Monty interpreter.bf/
: Directory containing Brainf*ck scripts used for testing.
To run the Monty interpreter, use the following command:
./monty <file_name>
Replace <file_name>
with the path to the Monty ByteCodes file you want to interpret.
Compile the Monty interpreter using the following command:
gcc -Wall -Werror -Wextra -pedantic -std=c89 *.c -o monty