/Compiler

Final project of Compilers subject at University of Lleida

Primary LanguageCMIT LicenseMIT

Compiler μC

Introduction

Compiler developed as final project of Compilers subject of Computer Engineering, University of Lleida. This compiler has been done using 'bison' for the syntactic analysis and Flex for the lexical analysis.

functionalities

  • Declare local variables of all types
  • Basic control structures
    • If.. else
    • While
    • Do.. While
    • For
  • Functions
  • Declare global variables of all types

Installation

  • Flex:

    sudo apt install flex

  • Bison:

    sudo apt install bison

  • gcc:

    sudo apt install gcc

  • g++:

    sudo apt install g++

  • Compile the project:

    make

Usage

  • Execute, file.uc will be the file you want to compile:

    ./mycc file.uc