Skip to content

unazed/ucc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rationale

C CI

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.

Building & usage

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.

Milestones

  1. 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)
  2. Preprocessing
  3. Parsing
  4. Code generation (LLVM backend)

Releases

No releases published

Packages

No packages published