monty

a command interpreter for Monty bytecode files

Stacks, Queues - LIFO, FIFO

What is this?

A project for Holberton School, this is an interpreter for Monty bytecodes files. Monty is a scripting language that is first compiled into Monty byte codes. It relies on a unique stack data structure with specific instructions to manipulate it. Monty byte codes usually have the .m extension.

Why?

This project reviewed the concepts of file input/output, linked lists, and stack data structure.

Requirements of project

Compilation

The files are to be compiled this way:

$ gcc -Wall -Werror -Wextra -pedantic *.c -o monty

How to use

  1. compile files
  2. $ ./monty monty_byte_code_file_name.m

A few Monty bytecode files are supplied in the byecodes directory. For supported opcodes, look below.

Example of usage

$ cat bytecodes/12.m
push 1
push 2
push 3
pall
add
pall
$ ./monty bytecodes/12.m
3
2
1
5
1

Implemented opcodes

Challenges

Features that I did not implement