Home

Awesome

0x18 C - Stacks, Queues - LIFO, FIFO


Description

This project in the Low Level Programming series is about:

Objective - Create a new interpreter to process Monty files

Monty is a scripting language that is first compiled into Monty Byte codes. 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 and using doubly linked list as stack or queue while being able to perform operations. The program must be able to process user inputted commands for operations like add or multiple, stack or queue and have no memory leaks.

Files


FileTask
monty.hPrimary header file with all function prototypes
free_stk.cfunction to free node
getops.cfunction to get operations
monty.cmain function to push/pop operations to stack or queue which is a linked list data structure
op_maths.cmultiple functions for math operations, example: add, sub, mul, div, mod
op_stack.cfunction to create a stack with linked list data structure
operations.cpush, pall, pop, pint, swap function to manipulate the stack/queue
operations2.cfunction that does no operations, nothin

Directories


Directory NameDescription
/montydirectory holding all files for Monty interpretor

How to compile

gcc 4.8.4 using the flags -Wall -Werror -Wextra and -pedantic

More Info

All files is formatted Betty style and checked using betty-style.pl and betty-doc.pl All header files is guarded

Author

Heindrick Cheung Josh Jimenez