summaryrefslogtreecommitdiff
path: root/doc/c1/index.md
diff options
context:
space:
mode:
authorTaylan Kammer <taylan.kammer@gmail.com>2026-06-01 21:49:37 +0200
committerTaylan Kammer <taylan.kammer@gmail.com>2026-06-01 21:49:37 +0200
commit724ac8ae394675a78c2977c6e35555b210256e01 (patch)
treed7f5574b49ec71341ea8079f18a33b9c17b60221 /doc/c1/index.md
parent9ce0aa66cedc985322e06db4bac130910610c113 (diff)
docs -> doc
Diffstat (limited to 'doc/c1/index.md')
-rw-r--r--doc/c1/index.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/c1/index.md b/doc/c1/index.md
new file mode 100644
index 0000000..af01cea
--- /dev/null
+++ b/doc/c1/index.md
@@ -0,0 +1,30 @@
+# Chapter 1: Genesis
+
+This chapter goes through the processes involved in reading source
+code, running it, and optionally compiling it.
+
+1. [Parse](1-parse.html)
+
+ The parser receives a stream of bytes and transforms them into a
+ minimal set of data types with very little processing.
+
+2. [Decode](2-decode.html)
+
+ The decoder runs configurable and extensible pre-processing steps
+ over data received from the parser, enriching it with more complex
+ data types, and handling primitive source code transforms. It's
+ comparable to the C pre-processor or Lisp's `DEFMACRO` mechanism,
+ with a few more responsibilities, such as number literal parsing.
+
+3. [Execute](3-execute.html)
+
+ Code is executed (or interpreted, or evaluated) in an environment,
+ also called a module, which may be mutated, and linked with other
+ modules. Execution is immediate, without any pre-compilation.
+
+4. [Compile](4-compile.html)
+
+ Procedures from within the compiler module can be used to demand
+ the compilation of other modules, with various options, yielding
+ static or dynamic object files. These may be loaded immediately,
+ replacing the previously uncompiled module code in memory.