martin2038 / r9cc

Toy C compiler

Home Page:https://www.utam0k.jp/en/blog/2018/10/12/r9cc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

r9cc C Compiler

r9cc is a toy project of compiler.
This is the 9cc Rust version.

Usage

Rust 2018 edition is required.

  • Compile
$ cargo run c_file_path
  • Test
$ make test

Current status

  • Four arithmetic operations
  • Logical operation
  • Local variable
  • Global variable
  • Function call
  • Function definition
  • Array
  • Pointer
  • ++/--
  • char/int type
  • String literal
  • Strunct
  • extern
  • Comment
  • #include
  • #define
  • __LINE__

Design

If you want more information, I think you should refer to README.md of 9cc.

Reference

Special thanks to 9cc and author rui314

About

Toy C compiler

https://www.utam0k.jp/en/blog/2018/10/12/r9cc/

License:MIT License


Languages

Language:Rust 93.1%Language:C 6.3%Language:Makefile 0.4%Language:C++ 0.1%Language:Pawn 0.0%