Skip to content

fedi-nabli/FodoCompiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

cpp workflow License

FodoCompiler

Fodo Compiler is a simple C project made for compiling C projects and file into x86 32-bit machine code. This compiler is made fully in C. It is 32-bit compatible.
At this stage the compiler performs lexical analysis and created a AST (Abstract Syntax Tree) for some types (still under developemnt).
For more information about the progress and stages check the 'Overview' section.

Setup

  • To be able to run this locally, you need to install make, gcc and gdb, to do this run:
sudo apt-get install make
sudo apt-get install gcc
sudo apt-get install gdb
sudo apt-get install gcc-multilib
sudo apt-get install g++-multilib
  • To run th project locally, you need gcc and make installed. Works better on linux.
  • Step 1: Clone the repository locally git clone https://github.com/fedi-nabli/FodoCompiler.git.
  • Step 2: Run make or make clean then make for clean build.
  • Step 3: Run ./main and the output should be 'Everything compiled ok'.

Overview

  • The compiler is still in the development stage for improvement.
  • The compiler is divided into 6 parts:
    • Lexer: Done
    • Parser: Done
    • Code generator: Done
    • Preprocessor: Done
    • Macro system: Done
    • Semantic validator: Done

Other

For any information or question contact me via email at [email protected] or [email protected].

About

A 32-bit C compiler made in C.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published