Code Monkey home page Code Monkey logo

compiler's Introduction

###################
# Compilateur C-- #
###################

# Description ###############################################################

Ceci est un compilateur pour une version allegée du C (cmm ou c--).
Les programmes sont compilés pour l'architechture Mini Stack Machine (MSM).
Ce projet comprend également un "testeur", ce dernier est un programme
permettant l'éxécution d'une batterie de test sur le compilateur.

# Build #####################################################################

Build du compilateur :
----------------------
Pré-requis : 
    - Cmake 3.1.X.X +
    - Make

Exécuter les commandes suivantes depuis la racine du projet :
    mkdir build
    cd build
    cmake ..
    make


Build de la Mini Stack Machine :
--------------------------------
Exécuter les commandes suivantes depuis la racine du projet :
    cd msm
    make

Build du testeur :
------------------
Pré-requis : 
    - Cmake 3.1.X.X +
    - Make
    - openmp
    - pthread

Pour installer openmp :
    sudo apt-get install libomp-dev

Exécuter les commandes suivantes depuis la racine du projet :
    mkdir test/build
    cd test/build
    cmake ..
    make

# Utilisation ###############################################################

Compiler un programme:
    usage: ./compiler source-code output-file
Exemple :
    ./build/compiler program.cmm program.out

Executer un programme:
    usage: msm/msm program.out

Lancer une batterie de test avec le testeur (depuis la racine du projet):
    usage: ./tester -m machine-path -c compiler-path -t test-folder-path
Exemple :
    ./test/build/tester -m msm/msm -c build/compiler -t test/tests/

Pour qu'un programme de test soit comptabilisé comme réussi il faut que tous les assert(valeur1, valeur2),
réussissent et qu'aucune autre sortie ne soit affichée dans la sortie standard (pas de print).

compiler's People

Contributors

g7r7 avatar senecatloic 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.