Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Writing a Compiler in 24 Small Steps

  1. Integers
  2. Immediate Constants
  3. Unary Primitives
  4. Binary Primitives
  5. Local Variables
  6. Conditional Expressions
  7. Heap Allocation
  8. Procedure Calls
  9. Closures
  10. Proper Tail Calls
  11. Complex Constants
  12. Assignment
  13. Extending the Syntax
  14. Symbols, Libraries, and Separate Compilation
  15. Foreign Functions
  16. Error Checking and Safe Primitives
  17. Variable-arity Procedures
  18. Apply
  19. Output Ports
  20. Write and Display
  21. Input Ports
  22. Tokenizer
  23. Reader
  24. Interpreter

Tests

  • tests-1.1-req.scm integers
  • tests-1.2-req.scm immediate constants
  • tests-1.3-req.scm fxadd1
  • tests-1.3-req.scm fixnum->char and char->fixnum
  • tests-1.3-req.scm fixnum?
  • tests-1.3-req.scm fxzero?
  • tests-1.3-req.scm null?
  • tests-1.3-req.scm boolean?
  • tests-1.3-req.scm char?
  • tests-1.3-req.scm not
  • tests-1.3-req.scm fxlognot
  • tests-1.4-req.scm if
  • tests-1.5-req.scm fx+
  • tests-1.5-req.scm fx-
  • tests-1.5-req.scm fx*
  • tests-1.5-req.scm fxlogand and fxlogor
  • tests-1.5-req.scm fx=
  • tests-1.5-req.scm fx<
  • tests-1.5-req.scm fx<=
  • tests-1.5-req.scm fx>
  • tests-1.5-req.scm fx>=
  • tests-1.5-req.scm if
  • tests-1.6-req.scm let
  • tests-1.7-req.scm binary primitives
  • tests-1.8-req.scm cons
  • tests-1.8-req.scm procedures
  • tests-1.8-req.scm deeply nested procedures
  • tests-1.9-req.scm begin/implicit-begin
  • tests-1.9-req.scm set-car! set-cdr!
  • tests-1.9-req.scm vectors
  • tests-1.9-req.scm strings
  • tests-2.1-req.scm procedure?
  • tests-2.1-req.scm applying thunks
  • tests-2.1-req.scm parameter passing
  • tests-2.1-req.scm closures
  • tests-2.2-req.scm set!
  • tests-2.3-req.scm complex constants
  • tests-2.4-req.scm letrec
  • tests-2.4-req.scm letrec*
  • tests-2.4-req.scm and/or
  • tests-2.4-req.scm when/unless
  • tests-2.4-req.scm cond
  • tests-2.6-req.scm vararg not using rest argument
  • tests-2.6-req.scm vararg using rest argument
  • tests-2.8-req.scm symbols
  • tests-2.9-req.scm exit
  • tests-2.9-req.scm S_error
  • tests-3.1-req.scm vector
  • tests-3.2-req.scm error
  • tests-3.2-req.scm apply error
  • tests-3.2-req.scm arg-check for fixed-arg procedures
  • tests-3.2-req.scm arg-check for var-arg procedures
  • tests-3.2-req.scm:;;; (arg-check for primitives
  • tests-3.3-req.scm string-set! errors
  • tests-3.3-req.scm string errors
  • tests-3.4-req.scm nontail apply
  • tests-3.4-req.scm tail apply
  • tests-3.4-req.scm nontail apply
  • tests-3.4-req.scm tail apply
  • tests-4.1-req.scm remainder/modulo/quotient
  • tests-4.1-req.scm write-char
  • tests-4.1-req.scm write/display
  • tests-4.2-req.scm eof-object
  • tests-4.2-req.scm read-char
  • tests-4.3-req.scm tokenizer
  • tests-4.3-req.scm reader
  • tests-5.1-req.scm tokenizer
  • tests-5.1-req.scm reader
  • tests-5.2-req.scm overflow
  • tests-5.3-req.scm call/cc
  • tests-5.6-req.scm fxmodulo

https://bernsteinbear.com/assets/img/11-ghuloum.pdf http://web.archive.org/web/20100310183100/http://www.cs.indiana.edu/~aghuloum/compilers-tutorial-2006-09-16.pdf http://web.archive.org/web/20100310183057/http://www.cs.indiana.edu/~aghuloum/compilers-tutorial-tests-2006-10-11.tgz https://github.com/namin/inc

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages