Public technical dossier for a lightweight C90 compiler project targeting RISC-V assembly.
Source code is not published here because the original implementation was produced for university coursework and is subject to academic integrity restrictions. This repository documents the architecture, feature coverage, verification approach, and engineering evidence without exposing solution code.
This project implemented a staged compiler pipeline for a practical subset of C90. The compiler was written in C++ and built around a conventional frontend-to-backend flow:
- Preprocessing for selected directives, macros, and local includes.
- Lexing with a generated scanner.
- Parsing with a grammar-driven parser.
- AST construction and semantic/context handling.
- RISC-V assembly code generation for supported C constructs.
The project was developed as a two-person team. My main contribution areas were lexer implementation, backend/code generation, and test development.
- C++ compiler implementation for a C90-style language subset.
- Flex/Bison-style frontend with explicit lexing and parsing stages.
- AST-driven backend with contextual handling for declarations, expressions, statements, and functions.
- RISC-V assembly generation for integer operations, control flow, function calls, local variables, arrays, pointers, structs, strings, and selected floating-point cases.
- Preprocessor extension supporting object-like macros, conditional compilation, and local includes.
- Regression-style testing using small C programs and driver files.
- Debug tooling for inspecting lexer/parser/compiler behaviour during development.
| Area | Evidence in this repo |
|---|---|
| Architecture | docs/architecture.md |
| Feature coverage | docs/feature-coverage.md |
| Verification approach | docs/testing-and-validation.md |
| Project ownership | docs/project-contributions.md |
| Publication policy | docs/source-availability.md |
- C++ systems programming
- Compiler architecture
- Lexing and parsing
- AST design
- RISC-V assembly generation
- Calling convention handling
- Regression testing
- Debug tooling
- Team-based engineering workflow
.
├── README.md
├── docs/
│ ├── architecture.md
│ ├── feature-coverage.md
│ ├── testing-and-validation.md
│ ├── project-contributions.md
│ └── source-availability.md
└── assets/
└── .gitkeep
The implementation source is intentionally private. I can discuss the architecture, design tradeoffs, debugging process, and selected non-sensitive implementation decisions in interviews. Where permitted, I can also provide supervised code review evidence without making the coursework solution public.