Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pedroediaz/xc

A toy self-compiling C compiler.
https://github.com/pedroediaz/xc

bsd-3-clause c89 c99 compiler embedded non-recursive parser shunting-yard unix

Last synced: 27 days ago
JSON representation

A toy self-compiling C compiler.

Awesome Lists containing this project

README

        

XC
==
A toy self-compiling C compiler.

Bugs
----
_ Can not use more than one token for defines
_ Check syntax rules for gotos and labels
_ Clean code for labels in ps.c
_ Warn for unused labels
_ Warn when there is no labels to goto

Rodemap
-------
_ Backpatching
_ Deadcode elimination

x Optimization
* Constant folding
* Deadcode elimination
_ Constant Propagation
x Preprocesor
* Warning
* Error
* Define
_ Ifdef
_ Include
x Integers
* Operators
* Constants
_ Variables
_ Floats
_ Operators
_ Constants
_ Variables
* Comments
* Return
* Gotos
_ If
_ While
_ Functions

Compile and test
----------------
make; ./cc TEST.c