This repository contains a compiler for Cshort, a simple C-like language, developed for the Fundamentals of Compilers course.
The compiler performs lexical, syntax, and semantic analysis, followed by code generation, converting .cshort files into an saida.mp output file.
cd src/
gcc -o compilador Analex.c main.c Anasint.c Anasem.c GeradorCodigo.c TabIdent.c
./compilador teste.cshort
The compiled output will be generated as src/saida.mp
├── afd/ # Deterministic Finite Automaton (DFA)
├── materials/ # Supporting materials
└── src/
├── Analex.c / .h # Lexical Analyzer
├── Anasem.c / .h # Semantic Analyzer
├── Anasint.c / .h # Syntax Analyzer
├── GeradorCodigo.c / .h # Code Generator
├── TabIdent.c / .h # Symbol Table
├── main.c # Compiler Entry Point
└── saida.mp # Output file generated after execution