Skip to content

ckrinitsin/ccc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chris' C Compiler

An attempt to write an (educational) C(17) compiler. Provides a Lexer, Parser and a Code Generator (x86_64).

The compiler driver uses GCC's preprocessor and assembler/linker, to help turning the code into an executable.

Supports:

  • Return
  • Unary operators (!, ~, -)
  • Binary arithmetic and logical operators (+, -, *, /, %, <<, >>, &, |)
  • Logical and relational operators (&&, ||, <, >, <=, >=, !=, ==)
  • Local variables (int)
  • Compound assignments and post/pre (inc/dec)rement (+=, /=, <<, ... and ++<var>, <var>-- ...)
  • If Statements (and goto + labeled statements)
  • Compound Statements
  • Loops and Switch Statements
  • Function calls
  • File scope
  • Long type

About

chris' c compiler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages