rucc is a small C compiler written in Rust.
- Rust
- gcc
rucc [ -o <path> ] <file>
make test
- Data types
- Primitive
- char
- short
- int
- long
- long long
- signed integer
- float
- double
- long double
- complex number
- enum
- union
- struct
- array
- pointer
- incomplete type
- Type qualifiers
- const
- volatile
- Storage class specifiers
- auto
- extern
- register
- static
- Primitive
- Expressions and Operators
- Assignment Operators (=, +=, -=, *=, /=, %=, <<=, >>=, &=, ^=, |=)
- Incrementing and Decrementing (++, --)
- Arithmetic Operators (+, -, *, %)
- Comparison Operators (==, !=, <, >, <=, >=)
- Logical Operators (&&, ||, !)
- Bit Shifting (<<, >>)
- Bitwise Logical Operators (&, |, ^, ~)
- Pointer Operators (*ptr, &var)
- sizeof
- Type Casts
- Array Subscripts
- Function Calls as Expressions
- The Comma Operator
- Member Access Expressions
- Conditional Expressions (?:)
- Statements and Declarations in Expressions
- Statements
- Labels
- The if Statements
- The switch Statements
- The while Statements
- The do Statements
- The for Statements
- Blocks
- The Null Statements
- The goto Statements
- The break Statements
- The continue Statements
- The return Statements
- The goto Statements
- The typedef Statements
- Functions
- Function Declarations
- Function Definitions
- Calling Declarations
- Function Parameters (up to 6 arguments)
- Variable Length Parameter Lists
- Calling Functions Through Function Pointers
- Recursive Functions
- Static Functions
- Program Structure and Scope
- Scope
- Ohter
- Preprocessor directives
Implementation
Document
- Intel® 64 and IA-32 Architectures Software Developer Manuals
- The GNU C Reference Manual
- Cリファレンスマニュアル 第5版
- エキスパートCプログラミング―知られざるCの深層
Other