PyCon UK

Registration Office

Pythonic Parsing with Pyparsing

Andrew Lawrence

Monday 17th, 14:30 (Room I)
Monday 17th, 11:30 (Room I)


A workshop (3 hours)

Processing structured textual data is a extremely common task for any programmer. One traditional approach to do this is to
use regular expressions but these can easily become unreadable and complex. Pyparsing aims to provide a simple object orientated and readable means to define parsers
in the style of Backus-Naur Form. It utilizes recursive decent parsing, which builds parsers from a set of mutually recursive procedures, and attempts to parse text in a top down fashion.

This talk will provide an overview of Pyparsing for a complete beginner. We will cover all the basics before moving onto some more advanced topics.

The first part will cover the basics of Pyparsing. We will see how to structure a simple application and the fundamental building blocks of parsers. Examples here will include parsing floating point numbers and date-time strings

Secondly, we will look at structuring results as well as adding in extra functionality and look-ahead to parsers. We will use the functionality described in this part to build a JSON parser

Finally, we address some more advanced topics such as debugging and white space management.


  • The speaker suggested this session is suitable for new programmers.

Back to schedule