Translating Ancient Texts: The Nginx Parser

Accepted Session
Short Form
Scheduled: Tuesday, June 20, 2017 from 1:30 – 2:15pm in B201


Find out what it took to get Certbot's Nginx parser working, which is an... exciting... tale at the intersection of programming language theory, regular expressions, formal grammars, and the utter lack of these in a fine, aged codebase.


Certbot, the web’s https-enabling robot buddy, uses Python. Nginx, one of the most popular webservers, was written in C twelve years ago. Its configuration files use no documented grammar — the source code is the only ground truth for what is valid. The parsing module is 1500 lines of something almost like a state machine. Hear how we translated this into about ten lines of Python so we could parse configuration files ourselves. Any cameos from computer science theory will be brief and entertaining.


regex, parsing, nginx

Speaking experience

Erica has given workshops and talks on topics such as building usable tools, Bitcoin, and programming fundamentals.


  • 2016 09 07 18.49.19 hdr

    Erica Portnoy

    Electronic Frontier Foundation


    Erica is a Staff Technologist at EFF building Certbot, the web’s https-enabling robot buddy. She earned her BSE in computer science at Princeton, where she researched oblivious computation for messaging privacy and took two different classes where she had to watch Star Trek for homework. Upon graduating, she protected authentication tokens in secure enclaves and experimented with searchable encryption. She likes dogs, the pouring rain, and being right.