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.
Articles:
- More Top-Down Parsing: JSON
- Simple Tokenizers (coming soon)
- Using Regular Expressions for Lexical Analysis
References:
- Top-Down Operator Precedence (article by Douglas Crockford, including a JavaScript formulation)
- Top-Down Operator Precedence (original paper by Vaughan Pratt 1973)
Related work:
- Pratt Parser (scheme implementation by George Carrette 1990)