a basic c compiler
a basic c compiler
mkdir -p build
cd build
cmake ..
make
./cc1 < input_file.c
OR
use the compile
script instead:
./compile file1.c file2.c file3.c
# then:
./a.out
(for now the bcc
executable
-which is intended to be a drop-in replacement for gcc
-
is not working yet)
it uses
gcc is invoked on assembler (“.S”) files only and transforms assembler to binary
and eventually link everything together and add the C standard library as well
with all required stuff to call main when program starts … :) !!!
UNFINISHED ! (there is a lot of things that does not work)
The Lex and Yaxx grammars this compiler is based on came from here: