PyCon 2019 in Cleveland, Ohio

Saturday 5:10 p.m.–5:40 p.m. in Grand Ballroom C

A Medieval DSL? Parsing Heraldic Blazons with Python!

Lady Red / Christopher Beacham


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.