|
|
|
|
|
Simple Top-Down Parsing in Python ::: Daily Python-URL
2008-07-15Fredrik Lundh:
Simple Top-Down Parsing in Python
[ "In the early seventies, Vaughan Pratt published an elegant improvement to recursive-descent in his paper Top-down Operator Precedence. Pratt's algorithm associates semantics with tokens instead of grammar rules, and uses a simple 'binding power' mechanism to handle precedence levels. /.../ In this article, I'll briefly explain how the algorithm works, discuss different ways to implement interpreters and translators with it in Python, and finally use it to implement a parser for Python's expression syntax."] ::: back to daily-URL
|