Florian Rappl
Building a Compiler with C#
#1about 4 minutes
Understanding the Roslyn compiler platform for C#
Roslyn is more than a black-box compiler, providing rich language service APIs that power IDE features like refactoring and code analysis.
#2about 2 minutes
Exploring C# code with Roslyn and LINQPad
Use a tool like LINQPad to see how Roslyn transforms C# source code into intermediate language (IL) and visualizes it as a syntax tree.
#3about 4 minutes
The motivation for building a custom language
A custom, high-performance language was needed to power a game that dynamically generates worlds from user-defined mathematical formulas.
#4about 3 minutes
Defining a language with a formal grammar
Creating a new language starts with a formal specification or grammar that defines its syntax using symbols and rules.
#5about 3 minutes
How compilers transform source code into executables
Compilers translate source code into a machine-readable format, either directly into object files or into platform-independent bytecode for a virtual machine.
#6about 5 minutes
The core stages of parsing source code
The parsing process involves multiple stages, including stream processing, tokenization, abstract syntax tree (AST) generation, and semantic analysis.
#7about 6 minutes
Structuring code with an Abstract Syntax Tree
An Abstract Syntax Tree (AST) represents code structure using nodes for statements and expressions, respecting operator precedence.
#8about 3 minutes
Traversing the AST using the Visitor Pattern
The Visitor design pattern provides a robust and type-safe way to traverse an Abstract Syntax Tree for analysis or code generation.
#9about 3 minutes
A live demo of a custom language REPL
A simple Read-Eval-Print Loop (REPL) demonstrates the custom language's features, including function definitions, currying, and AST inspection.
#10about 2 minutes
Implementing operator precedence with Pratt parsing
Pratt parsing is a technique that uses recursive function calls to elegantly handle operator precedence climbing in a compiler.
#11about 4 minutes
Understanding virtual machines and intermediate language
Process virtual machines execute platform-independent bytecode, or intermediate language (IL), which provides a linear instruction set derived from the AST.
Related jobs
Jobs that call for the skills explored in this talk.
Matching moments
07:43 MIN
Distinguishing between interpreters and compilers
Making Sense of Programming Languages
00:04 MIN
The value of understanding language internals
Making Sense of Programming Languages
00:25 MIN
A developer's journey through programming languages
Coffee with Developers - Martyn Kilbryde
17:25 MIN
Contrasting minimalist code with modernizing legacy applications
The weekly developer show: Boosting Python with CUDA, CSS Updates & Navigating New Tech Stacks
17:41 MIN
Presenting live web scraping demos at a developer conference
Tech with Tim at WeAreDevelopers World Congress 2024
00:57 MIN
What are C# source generators and how they work
C# 9 Source Generators - let the machine do the programming
07:07 MIN
How .NET applications execute on WebAssembly
Using WebAssembly to run, extend, and secure your application
26:34 MIN
Q&A on AI limitations and practical application
How to become an AI toolsmith
Featured Partners
Related Videos
Hacking C# from the inside - how to do anything in NET
Adam Furmanek
Exploring the Latest Features of .NET and C# by Building a Game
Rainer Stropek
Microfrontends with Blazor: Welcome to the Party!
Florian Rappl
Making Sense of Programming Languages
Aleksandra Sikora
C# 13 Unleashed: Live Demos of my Top 10 Cutting-Edge Features!
Ambesh Singh & Sachin Kumar
C# Lowering - What is it and why should I care?
Steven Giesel
Just-in-time Compilation in JVM
Daniel Strmečki
Livecoding with AI
Rainer Stropek
Related Articles
View all articles



From learning to earning
Jobs that call for the skills explored in this talk.

Software Development Engineer - LLVM Compiler
Advanced Micro Devices
Bristol, United Kingdom
API
C++
Linux





Fullstack Developer:in C#/.NET
Rocken AG
Solothurn, Switzerland
Remote
€115-130K
Intermediate
.NET
React
Angular
+5

Software Entwickler - C# / .NET
Rocken AG
Allmendingen bei Bern, Switzerland
.NET
Microsoft Access
Microsoft SQL Server

