A fully featured compiler for a custom programming language built from the ground up and targeting LLVM Intermediate Representation (IR).
This project implements the complete compilation pipeline and demonstrates strong practical knowledge of compiler design, programming languages, and systems engineering.
-
Custom Programming Language Design
- Well-defined syntax and semantics
- Typed expressions and structured control flow
-
Lexical Analysis
- Tokenization of source code
- Support for keywords, identifiers, literals, and operators
-
Parsing & AST Generation
- Grammar-based parsing
- Construction of a robust Abstract Syntax Tree (AST)
-
Semantic Analysis
- Type checking
- Symbol table and scope management
- Meaningful compile-time error reporting
-
LLVM Backend Code Generation
- Generation of LLVM IR
- Mapping high-level language constructs to LLVM instructions
- Compatible with LLVM optimization and code generation pipelines
Source Code
↓
Lexer
↓
Parser
↓
Abstract Syntax Tree (AST)
↓
Semantic Analyzer
↓
LLVM IR Generator
↓
Executable / Optimized IR