Giter Club home page Giter Club logo

compiler-assignment-3-and-4's Introduction

#Compiler

We will build a cross compiler with the source language as Java, Target Language as MIPS and implementation language as Python.

Lexer

We have a made a lexer for the source language JAVA . The ouptut of the program is a tagged program, with the token types appearing as comments.

Parser

Then from the above, we have made a parser and the output is a parse tree of the input program in dot format(that can be rendered using graphviz)

Intermediate Code Generator

Here, we wrote a Intermediate Code Generator(in Ass3 folder) for the source langauge JAVA. The output for it is a linked list of Three Address Code(3AC). So, we designed the 3AC code, attached semantic rules to the grammar designed in "Compiler-parser" repository to genertae a three-address code for JAVA langauge as a linked-list of three-address statements and print the 3-address code on the standard output.

Assembly Code Generator

Here, we then wrote an Assembly Code Generator from the above INtermediate Code Generator. The output of this is assembly code in MIPS. Here , we have implemented a register allocator,implement the translator to translate staements in three-address code to assembly instruction, set up the data regions to handle global data and constants, and provided some of the library support for useful programs.

=============================================== I TAKE NO GUARENTEE IF ANYONE COPIES THIS CODE ... THIS CODE IS FOR INFORMATION PURPOSE ONLY....

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.