Giter VIP home page Giter VIP logo

khitermedachraf / simple-compiler-flex-bison- Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 671 KB

1. Introduction Le but de ce projet est de réaliser un mini-compilateur de langage décrit ci-dessous, en effectuant les différentes phases de la compilation : lexicale, syntaxique, sémantique et génération du code intermédiaire. 2. Description du Langage

License: MIT License

Batchfile 0.07% C 78.48% Lex 4.82% Yacc 16.63%
flex bison langage-c

simple-compiler-flex-bison-'s Introduction

simple-compiler-Flex-Bison-

a. Introduction : The goal of this project is to create a language mini-compiler described below, by performing the different phases of compilation: lexical, syntactic, semantic and generation of the intermediate code. a. Language Description:

The implemented functionalities are:

1- For the lexical part, the file: lexicalProjet.l is OK.

2- For the syntax part, the file: syntaxiqueProjet.y is OK.

3- For the ts.h file, it contains:

  • The symbol table.
  • The functions used for the semantic part.

4- For the semantic part, the error cases treated are:

  • The size of the array <0.
  • The index of an array if it is an IDF, must be of type integer.
  • Non-type compatibility in the following cases: • Declaration of constants. • Assignments. • Formatting sign (not 100% optimized).
  • Undeclared IDF.
  • Double IDF declared.
  • Undeclared library
  • Declared double library
  • Division by Zero. (Only in the case of a constant = 0).
  • The incompatibility of the number of formatting marks with the number of IDFs in the read and write instruction.

simple-compiler-flex-bison-'s People

Contributors

khitermedachraf avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ashirrak

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.