We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

Top-Down Operator Precedence Parsing

Top-Down Operator Precedence is a simple and efficient parsing algorithm developed by Vaughan Pratt in the early seventies. The algorithm, also known as Pratt parsing, is a nice fit for Python, and lets you create fast and compact parsers and interpreters with very little effort.



Related work:

  • Pratt Parser (scheme implementation by George Carrette 1990)