https://buildyourownlisp.com/contents Contents * Build Your Own Lisp Chapter 1 * Introduction --------------------------------------------------------------------- * About * Who this is for * Why learn C * How to learn C * Why build a Lisp * Your own Lisp Chapter 2 * Installation --------------------------------------------------------------------- * Setup * Text Editor * Compiler * Hello World * Compilation * Errors * Documentation Chapter 3 * Basics --------------------------------------------------------------------- * Overview * Programs * Variables * Function Declarations * Structure Declarations * Pointers * Strings * Conditionals * Loops Chapter 4 * An Interactive Prompt --------------------------------------------------------------------- * Read, Evaluate, Print * An Interactive Prompt * Compilation * Editing input * The C Preprocessor Chapter 5 * Languages --------------------------------------------------------------------- * What is a Programming Language? * Parser Combinators * Coding Grammars * Natural Grammars Chapter 6 * Parsing --------------------------------------------------------------------- * Polish Notation * Regular Expressions * Installing mpc * Polish Notation Grammar * Parsing User Input Chapter 7 * Evaluation --------------------------------------------------------------------- * Trees * Recursion * Evaluation * Printing Chapter 8 * Error Handling --------------------------------------------------------------------- * Crashes * Lisp Value * Enumerations * Lisp Value Functions * Evaluating Errors * Plumbing Chapter 9 * S-Expressions --------------------------------------------------------------------- * Lists and Lisps * Pointers * The Stack & The Heap * Parsing Expressions * Expression Structure * Constructors & Destructors * Reading Expressions * Printing Expressions * Evaluating Expressions Chapter 10 * Q-Expressions --------------------------------------------------------------------- * Adding Features * Quoted Expressions * Reading Q-Expressions * Builtin Functions * First Attempt * Macros * Builtins Lookup Chapter 11 * Variables --------------------------------------------------------------------- * Immutability * Symbol Syntax * Function Pointers * Cyclic Types * Function Type * Environment * Variable Evaluation * Builtins * Define Function * Error Reporting Chapter 12 * Functions --------------------------------------------------------------------- * What is a Function? * Function Type * Lambda Function * Parent Environment * Function Calling * Variable Arguments * Interesting Functions Chapter 13 * Conditionals --------------------------------------------------------------------- * Doing it yourself * Ordering * Equality * If Function * Recursive Functions Chapter 14 * Strings --------------------------------------------------------------------- * Libraries * String Type * Reading Strings * Comments * Load Function * Command Line Arguments * Print Function * Error Function * Finishing Up Chapter 15 * Standard Library --------------------------------------------------------------------- * Minimalism * Atoms * Building Blocks * Logical Operators * Miscellaneous Functions * List Functions * Conditional Functions * Fibonacci Chapter 16 * Bonus Projects --------------------------------------------------------------------- * Only the Beginning * Native Types * User Defined Types * List Literal * Operating System Interaction * Macros * Variable Hashtable * Pool Allocation * Garbage Collection * Tail Call Optimisation * Lexical Scoping * Static Typing * Conclusion Appendix A * Hand Rolled Parser --------------------------------------------------------------------- * Hand Rolling * Replacing mpc * A Character at a Time * Reading Symbols * Reading Strings * Printing Strings * Cleaning Up Credits --------------------------------------------------------------------- FAQ --------------------------------------------------------------------- Source --------------------------------------------------------------------- Github --------------------------------------------------------------------- Translation (Chinese) --------------------------------------------------------------------- Translation (Portuguese)