summaryrefslogtreecommitdiffstats
path: root/python/python3-ply/README
blob: c3c6b73aa9b959f1f2bad98612c48ca45ad906b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
PLY is a zero-dependency Python implementation of the traditional
parsing tools lex and yacc. It uses the same LALR(1) parsing algorithm
as yacc and has most of its core features. It is compatible with all
modern versions of Python.

PLY was originally created in 2001 to support an Introduction to
Compilers course at the University of Chicago. As such, it has almost
no features other than the core LALR(1) parsing algorithm. This is by
design--students should be made to suffer. Well, at least a little
bit. However, from a more practical point of view, there is a lot
flexibility in terms of how you decide to use it. You can use PLY to
build Abstract Syntax Trees (ASTs), simple one-pass compilers,
protocol decoders, or even a more advanced parsing framework.