README.md (view raw)
1# Chris' C Compiler
2
3An attempt to write an (educational) C(17) compiler. Provides a Lexer, Parser and a Code Generator (x86\_64).
4
5The compiler driver uses GCC's preprocessor and assembler/linker, to help turning the code into an executable.
6
7### Supports:
8
9- Return
10- Unary operators (!, ~, -)
11- Binary arithmetic and logical operators (+, -, \*, /, %, <<, >>, &, |)
12- Logical and relational operators (&&, ||, <, >, <=, >=, !=, ==)
13- Local variables (int)
14- Compound assignments and post/pre (inc/dec)rement (+=, /=, <<, ... and ++\<var\>, \<var\>-- ...)
15- If Statements (and goto + labeled statements)
16- Compound Statements
17- Loops and Switch Statements
18- Function calls
19- File scope
20- Long type