Skip to content

Latest commit

 

History

History
98 lines (73 loc) · 2.68 KB

README.md

File metadata and controls

98 lines (73 loc) · 2.68 KB

MiniC

A simple toy language
Explore the docs »
· Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Acknowledgements

About The Project

This project contains an LLVM Frontend for MiniC, a toy language similar to the C Programming language.

Built With

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

ANTLR4

Follow the guide at https://github.com/antlr/antlr4/blob/master/doc/getting-started.md

ANTLR4-CPP Runtime

Follow the guide at https://github.com/antlr/antlr4/tree/master/runtime/Cpp

LLVM Project

Get the source code and build LLVM by following the guide at https://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm

Build Process

  1. Clone the repo
    git clone https://github.com/ajainuary/minic-compiler.git
  2. Move to the source code directory
  cd src/
  1. Compile the project
   make

Usage

In order to compile your miniC code simply run the executable with the source code file as the argument.

./minic <source-code>

A few sample programs to test could be found here

License

Distributed under the MIT License. See LICENSE for more information.

Acknowledgements

This project was built as a part of the Compilers Course at IIIT, Hyderabad. I am grateful to Prof. Suresh Purini and the TAs for guiding me through the project.