PLY (software)

From Wikipedia, the free encyclopedia
(Redirected from Python Lex-Yacc)
Jump to navigation Jump to search
PLY (Python Lex-Yacc)
Original authorDavid M. Beazley
Stable release
3.11
Repository
  • {{URL|example.com|optional display text}}Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
Written inPython
Engine
    Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
    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

    [edit | edit source]

    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

    [edit | edit source]

    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

    [edit | edit source]
    1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).

    Lua error in Module:Authority_control at line 153: attempt to index field 'wikibase' (a nil value).