UCC is a hand-written implementation aiming to support the full C11 grammar specification. This is a hobby project with the goal to dive in head-first into compiler theory without any solid foundation, and see where I come out by the end.
The target is built with the Makefile build system:
git clone --depth=1 https://github.com/unazed/ucc && cd ucc/
make
Then the target binary is named ucc
, argument usage is provided by ucc -?
.
Multiple compilation units are supported.
- Tokenization
- Lexing
- Raw strings (commit)
- Strings w/ encodings (UTF8, UTF16, UTF32 and wide encodings) (commit)
- Octal/hexadecimal sequences (commit)
- TODO: Universal escape sequences (unlikely to do, snorefest)
- Floating point numbers (and hexadecimal floats) (commit)
- Decimal numbers (commit), octal numbers (commit), hexadecimal numbers (commit), with suffixes supported
- Identifiers (commit)
- Unary/binary operators (commit)
- Include directives/multiline macros (commit)
- Dumping lexer output to file (commit)
- Rich diagnostics (commit)
- Multiple translation units (commit)
- Regression testing (commit)
- Lexing
- Preprocessing
- Parsing
- Code generation (LLVM backend)