PLY (software): Difference between revisions
Appearance
Content deleted Content added
NapoliRoma (talk | contribs) Changing short description from "Parsing tool written purely in Python" to "Re-implementation of Lex and Yacc in Python" |
|||
(10 intermediate revisions by 8 users not shown) | |||
Line 1: | Line 1: | ||
{{Short description|Re-implementation of Lex and Yacc in Python}} |
|||
{{ |
{{Other uses|Ply (disambiguation)}} |
||
{{ |
{{More citations needed|date=April 2014}} |
||
{{Infobox software |
{{Infobox software |
||
| name = PLY (Python Lex-Yacc) |
| name = PLY (Python Lex-Yacc) |
||
Line 23: | Line 23: | ||
}} |
}} |
||
'''PLY''' is a parsing tool written purely in [[Python (programming language)|Python]]. It is |
'''PLY''' is a [[parsing]] tool written purely in [[Python (programming language)|Python]]. It is, in essence, a re-implementation of [[Lex (software)|Lex]] and [[Yacc]] originally in [[C (programming language)|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.<ref name=off>{{cite web |url=/proxy/http://www.dabeaz.com/ply/|title=PLY Homepage}}</ref> |
||
==Features== |
==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 grammar]]s. |
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 grammar]]s. It supports Python 3. |
||
includes support for Python 3.0 and some other features. |
|||
==Structure |
==Structure the PLY module== |
||
PLY has the following two Python modules which are part of the ply package.<ref>{{cite web |url=/proxy/http://www.dabeaz.com/ply/ply.html#ply_nn2 |title=Official Documentation}}</ref> |
PLY has the following two Python modules which are part of the ply package.<ref>{{cite web |url=/proxy/http://www.dabeaz.com/ply/ply.html#ply_nn2 |title=Official Documentation}}</ref> |
||
*'''ply.lex''' - |
*'''ply.lex''' - A re-implementation of [[Lex (software)|Lex]] for lexical analysis |
||
*'''ply.yacc''' - |
*'''ply.yacc''' - A re-implementation of [[Yacc]] for parser creation |
||
These files contain the necessary modules. |
|||
==References== |
==References== |
||
{{Reflist}} |
{{Reflist}} |
||
{{Authority control}} |
|||
[[Category:Parser generators]] |
[[Category:Parser generators]] |
||
[[Category:Python software]] |
[[Category:Python (programming language) software]] |
||
[[Category:Lexical analysis]] |
[[Category:Lexical analysis]] |
Latest revision as of 00:58, 18 October 2024
This article needs additional citations for verification. (April 2014) |
Original author(s) | David M. Beazley |
---|---|
Stable release | 3.11
|
Repository | |
Written in | Python |
Website | dabeaz |
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]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]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