# Crafting Interpreters: a chapter-by-chapter study guide

> A companion to Robert Nystrom's Crafting Interpreters: all 30 chapters with reading guides, hours per chapter (about 163 in all), challenges and tests.

About half a year building two complete interpreters for Lox, a small but real language with closures and classes. First jlox, a tree-walking interpreter in Java (chapters 1 to 13), then clox, a bytecode virtual machine in C with its own hash table and garbage collector (chapters 14 to 30). A chapter a week, next to two NeetCode problems. You type every line yourself. It is the most fun phase of the path and the one that changes how you see every language you use.

| Chapter | Part | Week | Hours | Test suite |
| --- | --- | --- | --- | --- |
| [1. Introduction](https://cracked.guide/guide/ci-01) | Welcome | 1 | 2 | reading |
| [2. A Map of the Territory](https://cracked.guide/guide/ci-02) | Welcome | 1 | 2 | reading |
| [3. The Lox Language](https://cracked.guide/guide/ci-03) | Welcome | 1 | 2 | reading |
| [4. Scanning](https://cracked.guide/guide/ci-04) | jlox (tree-walk interpreter, Java) | 2 | 6 | chap04_scanning |
| [5. Representing Code](https://cracked.guide/guide/ci-05) | jlox (tree-walk interpreter, Java) | 3 | 4 | reading |
| [6. Parsing Expressions](https://cracked.guide/guide/ci-06) | jlox (tree-walk interpreter, Java) | 4 | 6 | chap06_parsing |
| [7. Evaluating Expressions](https://cracked.guide/guide/ci-07) | jlox (tree-walk interpreter, Java) | 5 | 5 | chap07_evaluating |
| [8. Statements and State](https://cracked.guide/guide/ci-08) | jlox (tree-walk interpreter, Java) | 6 | 6 | chap08_statements |
| [9. Control Flow](https://cracked.guide/guide/ci-09) | jlox (tree-walk interpreter, Java) | 7 | 4 | chap09_control |
| [10. Functions](https://cracked.guide/guide/ci-10) | jlox (tree-walk interpreter, Java) | 8 | 7 | chap10_functions |
| [11. Resolving and Binding](https://cracked.guide/guide/ci-11) | jlox (tree-walk interpreter, Java) | 9 | 7 | chap11_resolving |
| [12. Classes](https://cracked.guide/guide/ci-12) | jlox (tree-walk interpreter, Java) | 10 | 7 | chap12_classes |
| [13. Inheritance](https://cracked.guide/guide/ci-13) | jlox (tree-walk interpreter, Java) | 11 | 5 | chap13_inheritance |
| [14. Chunks of Bytecode](https://cracked.guide/guide/ci-14) | clox (bytecode VM, C) | 12 | 5 | reading |
| [15. A Virtual Machine](https://cracked.guide/guide/ci-15) | clox (bytecode VM, C) | 13 | 5 | reading |
| [16. Scanning on Demand](https://cracked.guide/guide/ci-16) | clox (bytecode VM, C) | 14 | 4 | reading |
| [17. Compiling Expressions](https://cracked.guide/guide/ci-17) | clox (bytecode VM, C) | 15 | 7 | chap17_compiling |
| [18. Types of Values](https://cracked.guide/guide/ci-18) | clox (bytecode VM, C) | 16 | 4 | chap18_types |
| [19. Strings](https://cracked.guide/guide/ci-19) | clox (bytecode VM, C) | 17 | 5 | chap19_strings |
| [20. Hash Tables](https://cracked.guide/guide/ci-20) | clox (bytecode VM, C) | 18 | 7 | chap20_hash |
| [21. Global Variables](https://cracked.guide/guide/ci-21) | clox (bytecode VM, C) | 19 | 5 | chap21_global |
| [22. Local Variables](https://cracked.guide/guide/ci-22) | clox (bytecode VM, C) | 20 | 6 | chap22_local |
| [23. Jumping Back and Forth](https://cracked.guide/guide/ci-23) | clox (bytecode VM, C) | 21 | 5 | chap23_jumping |
| [24. Calls and Functions](https://cracked.guide/guide/ci-24) | clox (bytecode VM, C) | 22 | 8 | chap24_calls |
| [25. Closures](https://cracked.guide/guide/ci-25) | clox (bytecode VM, C) | 23 | 8 | chap25_closures |
| [26. Garbage Collection](https://cracked.guide/guide/ci-26) | clox (bytecode VM, C) | 24 | 8 | chap26_garbage |
| [27. Classes and Instances](https://cracked.guide/guide/ci-27) | clox (bytecode VM, C) | 25 | 6 | chap27_classes |
| [28. Methods and Initializers](https://cracked.guide/guide/ci-28) | clox (bytecode VM, C) | 26 | 7 | chap28_methods |
| [29. Superclasses](https://cracked.guide/guide/ci-29) | clox (bytecode VM, C) | 27 | 4 | chap29_superclasses |
| [30. Optimization](https://cracked.guide/guide/ci-30) | clox (bytecode VM, C) | 28 | 6 | chap30_optimization |

About 163 hours in all.

## Questions

### How long does Crafting Interpreters take?

About 163 hours typing the code and doing some challenges, by the reading guides' budgets. The path gives it 28 weeks, a chapter a week next to two NeetCode problems.

### Is Crafting Interpreters free?

Yes. The whole book is free to read at craftinginterpreters.com, and the source and test suite are on GitHub. Print and eBook editions support the author.

### What languages does Crafting Interpreters use?

Java for jlox, the tree-walk interpreter in chapters 4 to 13, and C for clox, the bytecode VM in chapters 14 to 30.

---

Source: https://cracked.guide/crafting-interpreters
cracked.guide: A free, dated 145-week path to getting genuinely cracked at programming.
