Skip to content

About

My own compiler for a subset of C. Written in rust. Work in progress.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C Compiler in Rust

This project is a simple C compiler written in Rust, currently supporting basic lexing for a subset of C code.

Project Structure

  • compiler – The main Rust project folder
  • driver.rs – Entry point that runs the compiler
  • lexer.rs – Performs lexical analysis and generates tokens

Current Features

  • Lexical analysis of simple C programs
  • Supports the following tokens:
    • Keywords: int, void, return
    • Identifiers (e.g., main)
    • Constants (integer numbers)
    • Symbols: (, ), {, }, ;
  • Prints all tokens in order for debugging

To be added:

  • Parser
  • Code Emission
  • more Syntax

About

My own compiler for a subset of C. Written in rust. Work in progress.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages