A Medieval DSL? Parsing Heraldic Blazons with Python

Medieval people invented one of the first domain specific languages to describe how to paint Coats of Arms. We'll learn how to write our own parse grammar to parse this language, and then look at the parse grammar of Python itself!


Medieval European Nobility was obsessed with Lineage. They created a Heraldic System to track families, which assigned each family a unique Coat of Arms.
Any painting of the Coat of Arms was not the official version. The official version was a "Blazon" - a precise, terse description in heraldic language. This heraldic language reads like English, Latin, French, and XML had a baby. It's a fully recursive language with a formal grammar, variable assignment, positional arguments, and also, Lions, Bears, and Pythons.
Here's an example: Sable, on a fesse or three lions gules
In this talk, we look at parsing this Medieval Domain Specific Language with Python. Along the way, we'll learn a little history, and the tools for parsing and writing your own DSL.


Domains:

Makers

Domain Expertise:

none

Python Skill Level:

basic

Link to talk slides:

https://www.youtube.com/watch?v=7s5K-tLOV1M

Abstract as a tweet:

Did you know that a DSL with variables and recursion was invented when people were still building castles? This DSL describes exactly how to paint a coat of arms. Learn how to write a parser for it, and the tools to make your own DLS

Public link to supporting material:

https://github.com/mcscope/autoblazon