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.
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
Down the Oregon Trail with Functional C#
Simon Painter
C# 9 Source Generators - let the machine do the programming
Jiří Činčura
Microfrontends with Blazor: Welcome to the Party!
Florian Rappl
Tips, tricks and quirks in .NET
Paweł Łukaszuk
From learning to earning
Jobs that call for the skills explored in this talk.
Fullstack Entwickler C#/.NET & JavaScript (*)
Stolzberger GmbH
Berlin, Germany
Remote
.NET
Azure
Scrum
Docker
+4
Rösrath: Low-Code Developer - Microsoft Power Platform (a) - Köln
Recrudo GmbH
Rösrath, Germany
Remote
API
low-code
Lahr/Schwarzwald: Low-Code Developer - Microsoft Power Platform (a) - Köln
Recrudo GmbH
Lahr/Schwarzwald, Germany
Remote
API
low-code
Software Development : (1CT) Platform Software Developer (Core C#, .Net APIs, Design/Architecture)
ROHDE & SCHWARZ GmbH & Co. KG
Aachen, Germany
Remote
API
GIT
.NET
Routing
+4



