Skip to content

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

Notifications You must be signed in to change notification settings

khitermedachraf/simple-compiler-Flex-Bison-

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published