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.
ROSEN Technology and Research Center GmbH
Osnabrück, Germany
Senior
TypeScript
React
+3
IGEL Technology GmbH
Bremen, Germany
Senior
C++
Powershell
Matching moments
01:56 MIN
What are C# source generators and how they work
C# 9 Source Generators - let the machine do the programming
03:15 MIN
Distinguishing between interpreters and compilers
Making Sense of Programming Languages
04:29 MIN
The value of understanding language internals
Making Sense of Programming Languages
06:36 MIN
Defining C# lowering and its benefits
C# Lowering - What is it and why should I care?
02:25 MIN
Q&A on compiler adoption and the move to full-stack
To New Frontiers: The Future of Frontend Development
01:39 MIN
Summary and key takeaways for source generators
C# 9 Source Generators - let the machine do the programming
01:51 MIN
A developer's journey through programming languages
Coffee with Developers - Martyn Kilbryde
07:21 MIN
Contrasting minimalist code with modernizing legacy applications
The weekly developer show: Boosting Python with CUDA, CSS Updates & Navigating New Tech Stacks
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
C# 13 Unleashed: Live Demos of my Top 10 Cutting-Edge Features!
Ambesh Singh & Sachin Kumar
5 features that help you get the most out of C# 10
Louëlla Creemers
Microfrontends with Blazor: Welcome to the Party!
Florian Rappl
C# 9 Source Generators - let the machine do the programming
Jiří Činčura
Down the Oregon Trail with Functional C#
Simon Painter
Tips, tricks and quirks in .NET
Paweł Łukaszuk
Related Articles
View all articles



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





Skalbach Gmbh
Karlsruhe, Germany
Remote
.NET
Azure
Angular
Software Architecture
+1

euroident GmbH
Dietmannsried, Germany
Remote
€45-60K
GIT
Blazor
PostgreSQL
+1


