-
Notifications
You must be signed in to change notification settings - Fork 398
/
contents.html
261 lines (221 loc) · 12.5 KB
/
contents.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<h1>Contents <small>• Build Your Own Lisp</small></h1>
<div style="margin-top:50px"></div>
<!--
<div style='float:right'>
<div style='background-image:url(/static/img/book0.png); width:348px; height:512px; margin-bottom: 90px; margin-top:90px;'></div>
<div style='background-image:url(/static/img/book1.png); width:346px; height:512px; margin-bottom: 90px; margin-top:90px;'></div>
<div style='background-image:url(/static/img/book2.png); width:330px; height:512px; margin-bottom: 90px; margin-top:90px;'></div>
<div style='background-image:url(/static/img/book3.png); width:342px; height:512px; margin-bottom: 90px; margin-top:90px;'></div>
<div style='background-image:url(/static/img/book4.png); width:362px; height:512px; margin-bottom: 90px; margin-top:90px;'></div>
<div style='background-image:url(/static/img/book5.png); width:348px; height:512px; margin-bottom: 90px; margin-top:90px;'></div>
</div>
-->
<h3><a href="chapter1_introduction">Chapter 1 • Introduction</a></h3>
<hr/>
<ul>
<li><a href="chapter1_introduction#about">About</a></li>
<li><a href="chapter1_introduction#who_this_is_for">Who this is for</a></li>
<li><a href="chapter1_introduction#why_learn_c">Why learn C</a></li>
<li><a href="chapter1_introduction#how_to_learn_c">How to learn C</a></li>
<li><a href="chapter1_introduction#why_build_a_lisp">Why build a Lisp</a></li>
<li><a href="chapter1_introduction#your_own_lisp">Your own Lisp</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter2_installation">Chapter 2 • Installation</a></h3>
<hr/>
<ul>
<li><a href="chapter2_installation#setup">Setup</a></li>
<li><a href="chapter2_installation#text_editor">Text Editor</a></li>
<li><a href="chapter2_installation#compiler">Compiler</a></li>
<li><a href="chapter2_installation#hello_world">Hello World</a></li>
<li><a href="chapter2_installation#compilation">Compilation</a></li>
<li><a href="chapter2_installation#errors">Errors</a></li>
<li><a href="chapter2_installation#documentation">Documentation</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter3_basics">Chapter 3 • Basics</a></h3>
<hr/>
<ul>
<li><a href="chapter3_basics#overview">Overview</a></li>
<li><a href="chapter3_basics#programs">Programs</a></li>
<li><a href="chapter3_basics#variables">Variables</a></li>
<li><a href="chapter3_basics#function_declarations">Function Declarations</a></li>
<li><a href="chapter3_basics#structure_declarations">Structure Declarations</a></li>
<li><a href="chapter3_basics#pointers">Pointers</a></li>
<li><a href="chapter3_basics#strings">Strings</a></li>
<li><a href="chapter3_basics#conditionals">Conditionals</a></li>
<li><a href="chapter3_basics#loops">Loops</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter4_interactive_prompt">Chapter 4 • An Interactive Prompt</a></h3>
<hr/>
<ul>
<li><a href="chapter4_interactive_prompt#read_evaluate_print">Read, Evaluate, Print</a></li>
<li><a href="chapter4_interactive_prompt#an_interactive_prompt">An Interactive Prompt</a></li>
<li><a href="chapter4_interactive_prompt#compilation">Compilation</a></li>
<li><a href="chapter4_interactive_prompt#editing_input">Editing input</a></li>
<li><a href="chapter4_interactive_prompt#the_c_preprocessor">The C Preprocessor</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter5_languages">Chapter 5 • Languages</a></h3>
<hr/>
<ul>
<li><a href="chapter5_languages#what_is_a_programming_language">What is a Programming Language?</a></li>
<li><a href="chapter5_languages#parser_combinators">Parser Combinators</a></li>
<li><a href="chapter5_languages#coding_grammars">Coding Grammars</a></li>
<li><a href="chapter5_languages#natural_grammars">Natural Grammars</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter6_parsing">Chapter 6 • Parsing</a></h3>
<hr/>
<ul>
<li><a href="chapter6_parsing#polish_notation">Polish Notation</a></li>
<li><a href="chapter6_parsing#regular_expressions">Regular Expressions</a></li>
<li><a href="chapter6_parsing#installing_mpc">Installing mpc</a></li>
<li><a href="chapter6_parsing#polish_notation_grammar">Polish Notation Grammar</a></li>
<li><a href="chapter6_parsing#parsing_user_input">Parsing User Input</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter7_evaluation">Chapter 7 • Evaluation</a></h3>
<hr/>
<ul>
<li><a href="chapter7_evaluation#trees">Trees</a></li>
<li><a href="chapter7_evaluation#recursion">Recursion</a></li>
<li><a href="chapter7_evaluation#evaluation">Evaluation</a></li>
<li><a href="chapter7_evaluation#printing">Printing</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter8_error_handling">Chapter 8 • Error Handling</a></h3>
<hr/>
<ul>
<li><a href="chapter8_error_handling#crashes">Crashes</a></li>
<li><a href="chapter8_error_handling#lisp_value">Lisp Value</a></li>
<li><a href="chapter8_error_handling#enumerations">Enumerations</a></li>
<li><a href="chapter8_error_handling#lisp_value_functions">Lisp Value Functions</a></li>
<li><a href="chapter8_error_handling#evaluating_errors">Evaluating Errors</a></li>
<li><a href="chapter8_error_handling#plumbing">Plumbing</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter9_s_expressions">Chapter 9 • S-Expressions</a></h3>
<hr/>
<ul>
<li><a href="chapter9_s_expressions#lists_and_lisps">Lists and Lisps</a></li>
<li><a href="chapter9_s_expressions#pointers">Pointers</a></li>
<li><a href="chapter9_s_expressions#the_stack_and_the_heap">The Stack & The Heap</a></li>
<li><a href="chapter9_s_expressions#parsing_expressions">Parsing Expressions</a></li>
<li><a href="chapter9_s_expressions#expression_structure">Expression Structure</a></li>
<li><a href="chapter9_s_expressions#constructors_and_destructors">Constructors & Destructors</a></li>
<li><a href="chapter9_s_expressions#reading_expressions">Reading Expressions</a></li>
<li><a href="chapter9_s_expressions#printing_expressions">Printing Expressions</a></li>
<li><a href="chapter9_s_expressions#evaluating_expressions">Evaluating Expressions</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter10_q_expressions">Chapter 10 • Q-Expressions</a></h3>
<hr/>
<ul>
<li><a href="chapter10_q_expressions#adding_features">Adding Features</a></li>
<li><a href="chapter10_q_expressions#quoted_expressions">Quoted Expressions</a></li>
<li><a href="chapter10_q_expressions#reading_q-expressions">Reading Q-Expressions</a></li>
<li><a href="chapter10_q_expressions#builtin_functions">Builtin Functions</a></li>
<li><a href="chapter10_q_expressions#first_attempt">First Attempt</a></li>
<li><a href="chapter10_q_expressions#macros">Macros</a></li>
<li><a href="chapter10_q_expressions#builtins_lookup">Builtins Lookup</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter11_variables">Chapter 11 • Variables</a></h3>
<hr/>
<ul>
<li><a href="chapter11_variables#immutability">Immutability</a></li>
<li><a href="chapter11_variables#symbol_syntax">Symbol Syntax</a></li>
<li><a href="chapter11_variables#function_pointers">Function Pointers</a></li>
<li><a href="chapter11_variables#cyclic_types">Cyclic Types</a></li>
<li><a href="chapter11_variables#function_type">Function Type</a></li>
<li><a href="chapter11_variables#environment">Environment</a></li>
<li><a href="chapter11_variables#variable_evaluation">Variable Evaluation</a></li>
<li><a href="chapter11_variables#builtins">Builtins</a></li>
<li><a href="chapter11_variables#define_function">Define Function</a></li>
<li><a href="chapter11_variables#error_reporting">Error Reporting</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter12_functions">Chapter 12 • Functions</a></h3>
<hr/>
<ul>
<li><a href="chapter12_functions#what_is_a_function">What is a Function?</a></li>
<li><a href="chapter12_functions#function_type">Function Type</a></li>
<li><a href="chapter12_functions#lambda_function">Lambda Function</a></li>
<li><a href="chapter12_functions#parent_environment">Parent Environment</a></li>
<li><a href="chapter12_functions#function_calling">Function Calling</a></li>
<li><a href="chapter12_functions#variable_arguments">Variable Arguments</a></li>
<li><a href="chapter12_functions#interesting_functions">Interesting Functions</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter13_conditionals">Chapter 13 • Conditionals</a></h3>
<hr/>
<ul>
<li><a href="chapter13_conditionals#doing_it_yourself">Doing it yourself</a></li>
<li><a href="chapter13_conditionals#ordering">Ordering</a></li>
<li><a href="chapter13_conditionals#equality">Equality</a></li>
<li><a href="chapter13_conditionals#if_function">If Function</a></li>
<li><a href="chapter13_conditionals#recursive_functions">Recursive Functions</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter14_strings">Chapter 14 • Strings</a></h3>
<hr/>
<ul>
<li><a href="chapter14_strings#libraries">Libraries</a></li>
<li><a href="chapter14_strings#string_type">String Type</a></li>
<li><a href="chapter14_strings#reading_strings">Reading Strings</a></li>
<li><a href="chapter14_strings#comments">Comments</a></li>
<li><a href="chapter14_strings#load_function">Load Function</a></li>
<li><a href="chapter14_strings#command_line_arguments">Command Line Arguments</a></li>
<li><a href="chapter14_strings#print_function">Print Function</a></li>
<li><a href="chapter14_strings#error_function">Error Function</a></li>
<li><a href="chapter14_strings#finishing_up">Finishing Up</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter15_standard_library">Chapter 15 • Standard Library</a></h3>
<hr/>
<ul>
<li><a href="chapter15_standard_library#minimalism">Minimalism</a></li>
<li><a href="chapter15_standard_library#atoms">Atoms</a></li>
<li><a href="chapter15_standard_library#building_blocks">Building Blocks</a></li>
<li><a href="chapter15_standard_library#logical_operators">Logical Operators</a></li>
<li><a href="chapter15_standard_library#miscellaneous_functions">Miscellaneous Functions</a></li>
<li><a href="chapter15_standard_library#list_functions">List Functions</a></li>
<li><a href="chapter15_standard_library#conditional_functions">Conditional Functions</a></li>
<li><a href="chapter15_standard_library#fibonacci">Fibonacci</a></li>
</ul>
<div style="margin-top:50px"></div>
<h3><a href="chapter16_bonus_projects">Chapter 16 • Bonus Projects</a></h3>
<hr/>
<ul>
<li><a href="chapter16_bonus_projects#only_the_beginning">Only the Beginning</a></li>
<li><a href="chapter16_bonus_projects#native_types">Native Types</a></li>
<li><a href="chapter16_bonus_projects#user_defined_types">User Defined Types</a></li>
<li><a href="chapter16_bonus_projects#list_literal">List Literal</a></li>
<li><a href="chapter16_bonus_projects#operating_system_interaction">Operating System Interaction</a></li>
<li><a href="chapter16_bonus_projects#macros">Macros</a></li>
<li><a href="chapter16_bonus_projects#variable_hashtable">Variable Hashtable</a></li>
<li><a href="chapter16_bonus_projects#pool_allocation">Pool Allocation</a></li>
<li><a href="chapter16_bonus_projects#garbage_collection">Garbage Collection</a></li>
<li><a href="chapter16_bonus_projects#tail_call_optimisation">Tail Call Optimisation</a></li>
<li><a href="chapter16_bonus_projects#lexical_scoping">Lexical Scoping</a></li>
<li><a href="chapter16_bonus_projects#static_typing">Static Typing</a></li>
<li><a href="chapter16_bonus_projects#conclusion">Conclusion</a></li>
</ul>
<h3><a href="appendix_a_hand_rolled_parser">Appendix A • Hand Rolled Parser</a></h3>
<hr/>
<ul>
<li><a href="appendix_a_hand_rolled_parser#hand_rolling">Hand Rolling</a></li>
<li><a href="appendix_a_hand_rolled_parser#replacing_mpc">Replacing mpc</a></li>
<li><a href="appendix_a_hand_rolled_parser#a_character_at_a_time">A Character at a Time</a></li>
<li><a href="appendix_a_hand_rolled_parser#reading_symbols">Reading Symbols</a></li>
<li><a href="appendix_a_hand_rolled_parser#reading_strings">Reading Strings</a></li>
<li><a href="appendix_a_hand_rolled_parser#printing_strings">Printing Strings</a></li>
<li><a href="appendix_a_hand_rolled_parser#cleaning_up">Cleaning Up</a></li>
</ul>
<h3><a href="credits">Credits</a></h3> <hr/>
<h3><a href="faq">FAQ</a></h3> <hr/>
<h3><a href="static/source.tar.gz">Source</a></h3> <hr/>
<h3><a href="https://github.com/orangeduck/BuildYourOwnLisp">Github</a></h3> <hr/>
<h3><a href="https://www.abnerchou.me/BuildYourOwnLispCn/">Translation (Chinese)</a></h3>