Coding A C Compiler In Javascript

Posted By: ELK1nG

Coding A C Compiler In Javascript
Published 8/2025
MP4 | Video: h264, 1920x1080 | Audio: AAC, 44.1 KHz
Language: English | Size: 10.00 GB | Duration: 18h 18m

Learn all steps of compiler design in one course, and learn to write a C compiler in Javascript.

What you'll learn

Learn how to write a lexer which turns the C code into tokens, the smallest atomic parts of a programming language.

Learn how to write a code generator, which takes your AST as input and emits a complete Assembly program that you turn into an executable .EXE or .ELF file.

Learn to write a parser which parses the C code, through the tokens, and turning it into a data structure your program understands.

Extra: Learn to create your own regular expression library that works not just with strings, but with any datatype as input.

Learn to create an abstract syntax tree (AST), the primary data structure of any compiler.

Extra: Learn how to write a transpiler (or pre-compiler) which adds functionality to Javascript itself.

Extra: You will also learn the basics and intermediates of Typescript, a popular Javascript add-on.

Everything you learn about compilers in this course, will work with any languages, not just Javascript and C.

Requirements

You need to have a basic understanding of Javascript, that is all. Everything related to ie. Typescript, C or Assembly - I will explain at every step.

Description

Coding a C compiler in JavascriptIn this exciting new project we'll be coding a real C compiler in Javascript.The first version will be able to parse a few commands and when all the steps are done (lexing, defining grammar, parsing, generating an AST, emitting code and writing the compiler driver) we will add new functionality, one command at the time.You will learn every step of compiler design in this 15 episode course. In addition to this, you will also learn how to build your own, datatype-independent regular expression library and also a transpiler/pre-compiler for JS/TS code.Prerequisites To follow along in this project you need a basic understanding of Javascript. That's it. Everything Node- or C or Typescript related will be explained at every step.Operating systemsThis project will work equally well in Windows, Mac OS X or Linux. All you need is Node.js and Nasm. Just follow the instructions from the intro. Happy coding!About the authorDr. Jonas is an experienced instructor who's been coding for 25 years and teaching for almost ten years. His popular Youtube channel has almost 50 000 subscribers and he's also running his own web TV channel with programming content. He's an appreciated teacher with stunning reviews and several programming courses of different kind.Enroll Today! Or check out the two hours of free previews.

Overview

Section 1: Free preview: Chapter 1 (Lexing)

Lecture 1 Free preview: Episode one

Section 2: Chapter 1: Lexing

Lecture 2 Episode one

Section 3: Chapter 2: Grammar and REX

Lecture 3 Episode two

Lecture 4 Episode three

Lecture 5 Episode four

Section 4: Chapter 3: ASTs and Transpiler

Lecture 6 Episode five

Lecture 7 Episode six

Lecture 8 Episode seven

Lecture 9 Episode eight

Section 5: Chapter 4: Parsing and Code generation

Lecture 10 Episode nine

Lecture 11 Episode ten

Lecture 12 Episode eleven

Lecture 13 Episode twelve

Lecture 14 Episode 13

Section 6: Chapter 5: Compiler and main program

Lecture 15 Episode 14

Lecture 16 Episode 15

This course is for Javascript developers who wishes to learn compiler design.,This course is also for C developers who wishes to learn compiler design.