Talk type: Talk

Python Has a Ready-Made Frontend for Your Compiler

  • Talk in Russian
Presentation pdf

Normal people write compilers too, especially when it is about a small domain-specific language (DSL) compiler. What to do if operations overloading is no longer enough, and PLY-like tools look too heavy? Reuse the syntax of Python itself, then we will get lexical and syntactic analysis almost for free!

The talk will cover the fast creating of compilers with help of ast module, type annotations and match/case constructs. The talk is illustrated by a number of examples, from the simplest static analyzers in the spirit of a toy mypy to DSL-compilers of different complexity.

  • #dsl_compiler
  • #ast_module
  • #pattern_matching


Invited experts