Skip to content

an-thony350/C90-Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

C90 Compiler

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.

Overview

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:

  1. Preprocessing for selected directives, macros, and local includes.
  2. Lexing with a generated scanner.
  3. Parsing with a grammar-driven parser.
  4. AST construction and semantic/context handling.
  5. 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.

Highlights

  • 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.

Public Evidence

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

Skills Demonstrated

  • 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

Repository Contents

.
├── README.md
├── docs/
│   ├── architecture.md
│   ├── feature-coverage.md
│   ├── testing-and-validation.md
│   ├── project-contributions.md
│   └── source-availability.md
└── assets/
    └── .gitkeep

Notes for Recruiters

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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors