Get the latest tech news
How to Compile Your Language – Guide to implement a modern compiler for language
This guide is intended to be a practical introduction to how to design your language and implement a modern compiler for it. The source code of the compiler is available on GitHub.
The guide also covers how to create a platform specific executable with the help of the LLVM compiler infrastructure, which all of the previously mentioned languages use for the same purpose. In fact even a lot of modern popular languages like C++, Rust, Swift, Haskell or Kotlin/Native rely on LLVM for optimization and code generation. This guide also uses LLVM to create an executable and focuses on implementing the frontend, which consists of 3 parts, the lexer, the parser and the semantic analyzer.
Or read this on Hacker News