Giter Club home page Giter Club logo

aravindsomaraj / compiler-lab Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 44 KB

Welcome to the Compiler Design Laboratory Course! In this course, a compiler is built from scratch. There's different stages of the compilation process, including lexical analysis, syntax analysis, creation of Abstract Syntax Tree, code generation, and optimization which are all utilized in this course.

Makefile 0.88% C++ 72.66% Lex 3.93% Yacc 12.82% C 9.71%
compiler-design yacc-lex

compiler-lab's Introduction

CS3140 - Compiler Design Laboratory

  • Course Instructor: Unnikrishnan C

Introduction

Welcome to the Compiler Design Laboratory Course! In this course, a compiler is built from scratch. There's different stages of the compilation process, including lexical analysis, syntax analysis, creation of Abstract Syntax Tree, code generation, and optimization which are all utilized in this course.

Instructions

  • To clone the repository to your local machine, open terminal in the desired directory and run the following:
    git clone https://github.com/aravindsomaraj/compiler-lab.git
    
  • Go the repo, and there's 3 directories present:
    • calculator is a simple compiler that evaluates arithmetic operations and prints the output. To do this compiler, run the following:
      cd calculator
      make run
      
    • compiler is a fully designed compiler that's capable of compiling and executing more elaborate code. Run the following to see:
      cd compiler
      make run
      
    • Test2 is the directory containing the code for Lab Test 2 of CS3140. It supports local and global declarations, array declarations and evaluation of integer and boolean along with assign and write capabilities (for strings as well). To run the compiler:
      cd Test2
      make
      bin/compiler < [Your test input file here]
      
      
    • compiler_final is the directory that contains the code for the final project of CS3140. It supports dimensional arrays, function definition and calling, along with read capabilities, and finally the generated of the corresponding C code analogous to the source code. To run:
      cd compiler_final
      make
      bin/compiler < [Your .sil test input file here]
      

View the Change Log โ†—.

compiler-lab's People

Contributors

aravindsomaraj avatar

Stargazers

 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.