Writing a Lisp compiler (Lisp to assembly) from scratch in JavaScript (2018)

In this post, we delve into compiler basics covering user-defined functions, LLVM system calls, and an x86 upgrade. The focus is on creating a simple compiler in JavaScript without third-party libraries. By parsing input programs using an S-expression syntax, we aim to generate assembly code to perform specific operations and produce desired exit codes. The parser and compiler functions are discussed in detail, emphasizing the significance of generating an Abstract Syntax Tree. Building on assembly basics and function calling conventions, we demonstrate code generation by compiling a sample program to produce a working compiler. The process culminates in generating an executable file through assembly code and gcc.

https://notes.eatonphil.com/compiler-basics-lisp-to-assembly.html

To top