~/talk

Python ships a ready-made frontend for your compiler

TalkinRussianat PiterPy 2023 · 2023-11-07..11-14· [python, compilers-and-language-design]
links:none on file
slides:none on file

Shows how to build compilers and DSL compilers in Python by reusing Python’s own syntax so you avoid separate lexing/parsing. Demonstrates using the standard ast module and the match/case pattern-matching syntax to implement everything from simple static analyzers to more complex DSL compilers.

AI-written summary · about

  1. 0:00Introduction
  2. 1:46Compilers for everyone
  3. 4:17Pattern matching in Python
  4. 8:12Code formatting with AST
  5. 9:16Expression simplification
  6. 10:42Stack code generation
  7. 12:28Python AST module
  8. 15:40AST visualization
  9. 17:07DSL for graphs compilation
  10. 22:40Datalog language implementation
  11. 32:10Control flow graph
  12. 37:27Static code analysis
  13. 41:44WebAssembly compilation
  14. 45:11Recommendations and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.