Misplaced Pages

PLY (software)

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Re-implementation of Lex and Yacc in Python For other uses, see Ply (disambiguation).
This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "PLY" software – news · newspapers · books · scholar · JSTOR (April 2014) (Learn how and when to remove this message)
PLY (Python Lex-Yacc)
Original author(s)David M. Beazley
Stable release3.11
Repository
Written inPython
Websitedabeaz.com/ply/

PLY is a parsing tool written purely in Python. It is, in essence, a re-implementation of Lex and Yacc originally in C-language. It was written by David M. Beazley. PLY uses the same LALR parsing technique as Lex and Yacc. It also has extensive debugging and error reporting facilities.

Features

Implemented in Python, it has almost all the features provided by Lex and Yacc. It includes support for empty productions, precedence rules, error recovery, and ambiguous grammars. It supports Python 3.

Structure the PLY module

PLY has the following two Python modules which are part of the ply package.

  • ply.lex - A re-implementation of Lex for lexical analysis
  • ply.yacc - A re-implementation of Yacc for parser creation

References

  1. "PLY Homepage".
  2. "Official Documentation".
Categories: