Skip to content

My implementation of the C compiler from Nora Sandler's book "Writing a C Compiler"

License

Notifications You must be signed in to change notification settings

dplassgit/adventofcompilers

Repository files navigation

Advent of Compilers

In which I write the compiler from "Writing a C Compiler" by Nora Sandler.

Running

From this directory:

./scripts/mycc example/main.c

Requires classfiles to be in the bin directory

Testing

From the writing-a-c-compiler-tests repo directory:

./test_compiler ../adventofcompilers/scripts/mycc --chapter 1

or

./test_compiler ../adventofcompilers/scripts/mycc --chapter 3 --stage lex

Notes to self

Update TackyCodeGen for --stage tacky updates.

Update TackyInstructionToInstructionsVisitor for --stage codegen updates.

Update TackyToAsmCodeGen for "Assembly Generation" updates.

About

My implementation of the C compiler from Nora Sandler's book "Writing a C Compiler"

Topics

Resources

License

Stars

Watchers

Forks