Giter Site home page Giter Site logo

monty's Introduction

Monty Intepreter

Monty 0.98 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. Monty Intepreter is a languange used to inteprete Byte code Files.

Table of Contents

Getting Started

These instructions will help you set up the project locally, for development and testing purposes.

Prerequisites

i. Clone this repo

  git clone https://github.com/timmySpark/Playground.git

ii. Compile the codes

  gcc -Wall -Werror -Wextra -pedantic -std=c89 *.c -o monty

iii. Run the script

  ./monty text

Opcodes

Below are some of the opcodes that work with this Monty Intepreter:-

Push

This opcode pushes an element to the stack

  push <integer>

Pall

The opcode pall prints all the values on the stack, starting from the top of the stack.

  pall

Pint

The opcode pint prints the value at the top of the stack, followed by a new line.

  pint

Pop

The opcode pop removes the top element of the stack.

  pop

Swap

The opcode swap swaps the top two elements of the stack.

  swap

Add

The opcode add adds the top two elements of the stack.

  Add

nop

The opcode nop doesn’t do anything.

  nop

sub

The opcode sub subtracts the top element of the stack from the second top element of the stack.

  sub

Div

The opcode div divides the second top element of the stack by the top element of the stack.

  div

Mul

The opcode mul multiplies the second top element of the stack with the top element of the stack.

  mul

Mod

The opcode mod computes the rest of the division of the second top element of the stack by the top element of the stack.

  mod

Bytecode File

Text file contains certain bytecodes the monty bytecode reads and intepretes, you can edit it to your taste

push 1
push 2
push 3
pall
pop
pall
pop
pall
pop
pall

Running the Tests

Explain how to run the automated tests for this system.

coming soon ...

Built With

  • C Programming Language.

Authors

monty's People

Contributors

wondahs avatar timmyspark avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.