Skip to content

A C0 compiler for homework | C0 编译器 | 北航软院编译原理大作业

Notifications You must be signed in to change notification settings

lynzrand/chigusa

Repository files navigation

Chigusa

logo

Chigusa is a C0 to O0 compiler written in Rust. This compiler is a homework of the Compilation Principle class in BUAA.

中文 Readme 和设计说明

Progress

  • Tokenizer
  • Parser
  • Code generator
  • CLI

About C0

C0 is a subset of C programming language used in the specification of this homework. A description of the grammar used in this project can be found here. O0 is the corresponding binary file format also specified in this homework.

The official C0 and O0 format standards (Chinese):

Usage

# Parse and compile a c0 source file to `out` as c0 binary
$ chigusa <file> -o <output_file>

# Compile the file as c0 assembly
$ chigusa <file> -s -o <output_file>
# or
$ chigusa <file> --emit s0 -o <output_file>

Chigusa's implementation

Chigusa uses a handwritten recursive-descending parser to parse C0 programs.

License

Chigusa is licensed under MIT license.

(c) 2018-2019 Rynco Maekawa

Documentation

For more documentation and Chinese readme, see docs.

Dependencies

Naming

Chigusa (Fukazawa Chigusa) is a character from the anime Iroduku: The World In Colors. Finally an anime boy gets on the list!

About

A C0 compiler for homework | C0 编译器 | 北航软院编译原理大作业

Resources

Stars

Watchers

Forks

Packages

No packages published