A version of interpreter for Monty ByteCodes files
named monty
created by Wendy Segura and Joann Vuong .
monty
is a scripting language that is first compiled into Monty byte codes (Just like Python). It relies on a unique stack, with specific instructions to manipulate it. The goal of this project is to create an interpreter for Monty ByteCodes files.
-
push 1
-
push 2
-
push 3
-
pall
-
Output: prints to stdout:
-
3
-
2
-
1
All files are in the Betty
style. Notes on this style can be found at https://github.com/holbertonschool/Betty/wiki
All files will be compiled with the following: $ gcc -Wall -Werror -Wextra -pedantic *.c -o monty
The following functions are handled with monty
:
pint
: prints the value at the top of the stack, followed by a new line.pall
: pall prints all the values on the stack, starting from the top of the stack.push
: push pushes an element to the stacknop
: implement the nop opcode.pop
: pop removes the top element of the stack.
README.md
: Current file, contains information about this projectmonty.h
: Header file, contains all prototypes for funcitons used, as well as libriaries and macrosmonty.c
: Contains the code formonty
pushpallpintpop.c
: File for functions push, pall, pint, and popswapnop.c
: File containing function for nopstack_struct.h
: stack related strutctsmatch_specifier.c
: function pointerfree.c
: File that free malloc and other