Jump to content

PLY (software)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by JJMC89 bot III (talk | contribs) at 21:18, 21 September 2020 (Moving Category:Python software to Category:Python (programming language) software per Wikipedia:Categories for discussion/Speedy). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

PLY (Python Lex-Yacc)
Original author(s)David M. Beazley
Stable release
3.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.[1]

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 of a PLY file

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

  • 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".