A C Compiler written in Dart
  • Dart 99.8%
  • C 0.2%
Find a file
2026-03-24 16:03:13 +03:00
bin Finished Chapter 10, extra-credit 2025-02-09 23:02:02 +03:00
tests Finished Chapter 7, Extra Credit 2025-01-05 10:47:55 +03:00
.gitignore Finished Chapter 8, parser 2025-01-06 00:28:47 +03:00
analysis_options.yaml The Big Bang! 2024-11-08 15:18:57 +03:00
mycompiler Finished chapter 3, tackyer 2024-11-14 13:00:07 +03:00
pubspec.yaml Finished Chapter 9, extra credit 2025-02-03 01:58:24 +03:00
README.md Updated README 2026-03-24 16:03:13 +03:00

A C Compiler written in Dart

Following the book: WRITING A C COMPILER 978-1-7185-0042-6

dart compile exe bin/main.dart -o mycompiler

./mycompiler tests/test.c --codegen

~/Tests/writing-a-c-compiler-tests/test_compiler ./mycompiler --chapter 10 --extra-credit -f ~/Tests/writing-a-c-compiler-tests/test_compiler ./mycompiler --chapter 10 -f

~/Tests/writing-a-c-compiler-tests/test_compiler ./mycompiler --chapter 10 --extra-credit -f --skip-invalid --stage codegen

./mycompiler tests/test.c && ./tests/test; echo $?

./mycompiler -c -g tests/test.c && ./mycompiler -c -g tests/external.c gcc -g -o tests/test tests/test.o tests/external.o ./tests/test; echo $?

./mycompiler tests/test.c gcc -g -o tests/myex tests/test.s ~/Tests/writing-a-c-compiler-tests/tests/chapter_9/valid/stack_arguments/stack_alignment_check_linux.s