it just explains like “this is what happens when you run the code” instead of “here is how the code works”, if you want to know the latter please read https://www.oilshell.org/archive/Thompson-1968.pdf
Regex is something of an early JIT compiler
Russ Cox has a much better explanation of Thompson's Construction and a pragmatic approach to implementation. Start here: