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

https://github.com/dplassgit/adventofcompilers

My implementation of the C compiler from Nora Sandler's book "Writing a C Compiler"
https://github.com/dplassgit/adventofcompilers

compiler compiler-construction compilers writing-a-c-compiler

Last synced: 12 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# 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.