This project consists of the development of a basic compiler as part of the Compilers undergraduate course. The main goal is to understand, in practice, how programming languages are processed. The project focus on core compiler construction concepts such as lexical, syntactic, and semantic analysis.
⚠️ [TO BE DEFINED] Some sections that follow will be updated throughout the development.
The compiler will process source code written in a custom language and translate it into C code, which can then be compiled using a standard C compiler such as the gcc (GNU Compiler Collection)
This approach allows us to focus on the compilation process itself while leveraging a mature backend for execution.
- Programming Language: [TBD]
- Target Language: C
- Parsing Strategy: TBD
- Tools/Libraries: TBD
The implementation will follow the traditional compiler pipeline:
- Lexical Analysis (Scanner): Tokenization of source code
- Syntactic Analysis (Parser): Grammar validation and AST generation
- Semantic Analysis: Type checking and scope resolution
- Intermediate Code Generation: Translation to C
- Error Handling: Detection and reporting of compilation errors
- Arithmetic Operators
- Explicit Declaration
- Primitive Data Types (int, float, boolean, string, char)
- Relational Operators (producing boolean)
- Logical Operators (producing boolean)
- Unary Operators
- Expressions
- Variable Initialization
- String Concatenation
- Type Conversion
- Global Scope
- Blocks
- Static Scope
- Decision Commands (if, if/else, switch)
- Conditional Expressions
- Loop Commands (for, while, do/while)
- Loop Control Mechanisms
- Arrays
- Array Initialization
- Input and Output Commands
- Compound Operators
- Subprograms (Functions)
- Error Detection
Instructions on how to clone, build, and run the project will be added once the development environment is established.
git clone https://github.com/<your-username>/<your-repo>.git- ...