Giter Site home page Giter Site logo

amoskodare / simple-mini-pascal-compiler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scaperoth/simple-mini-pascal-compiler

0.0 0.0 0.0 264 KB

mini (very mini) pascal compiler written using flex, bison, c and MIPS

Oxygene 4.34% C 95.66%

simple-mini-pascal-compiler's Introduction

simple-mini-pascal-compiler

mini (very mini) pascal compiler written using flex, bison, c and MIPS

###Instructions

  • install flex and bison if you haven't already (Google search "install flex and bison" if you are having trouble)
  • run make
  • using the test files run ./project3.2 /optionalpath/nameoftestfile.pas
  • the output of this will tell you if your file is syntactically correct and will generate a "nameoftestfile.s" file
  • once this file is generated you can run it in Mars to execute your code!

###Dependencies

Instructions on how to download the first two can be found relatively easily online

  • flex
  • bison
  • mars
    • open the *.s file and hit f3 to assemble the code then f5 to run it

Note: In Ubuntu, flex and bison can be installed using apt-get
$sudo apt-get update
$sudo apt-get upgrade
$sudo apt-get install flex bison


###Disclaimer Keep in mind that the functionality is very limited. Simple statments such as if...then...else with basic integer relation operators, addition, multiplication, and division are all accepted in the current version. It's best to assume that all other functionality is unsupported.


######TODO Currently it does not support while loops.
Nesting if...then...else logic not been tested.
String and character manipulation is unsupported (or at least untested).
...and much more...

simple-mini-pascal-compiler's People

Contributors

scaperoth 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.