Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/utam0k/r9cc

Toy C compiler
https://github.com/utam0k/r9cc

compiler rust

Last synced: about 6 hours ago
JSON representation

Toy C compiler

Awesome Lists containing this project

README

        

r9cc C Compiler
===============

r9cc is a toy project of compiler.
This is the [9cc](https://github.com/rui314/9cc) Rust version.

# Usage
Rust 2018 edition is required.

- Compile

```
$ cargo run c_file_path
```

- Test

```
$ make test
```

# Current status
- [x] Four arithmetic operations
- [x] Logical operation
- [x] Local variable
- [x] Global variable
- [x] Function call
- [x] Function definition
- [x] Array
- [x] Pointer
- [x] ++/--
- [x] char/int type
- [x] String literal
- [x] Strunct
- [x] extern
- [x] Comment
- [x] #include
- [x] #define
- [x] \_\_LINE\_\_

# Design
If you want more information, I think you should refer to [README.md](https://github.com/rui314/9cc/blob/master/README.md) of [9cc](https://github.com/rui314/9cc).

# Reference
Special thanks to [9cc](https://github.com/rui314/9cc) and author [rui314](https://github.com/rui314)