head 1.2; access; symbols pkgsrc-2026Q1:1.2.0.42 pkgsrc-2026Q1-base:1.2 pkgsrc-2025Q4:1.2.0.40 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.38 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.36 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.2.0.34 pkgsrc-2025Q1-base:1.2 pkgsrc-2024Q4:1.2.0.32 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.2.0.30 pkgsrc-2024Q3-base:1.2 pkgsrc-2024Q2:1.2.0.28 pkgsrc-2024Q2-base:1.2 pkgsrc-2024Q1:1.2.0.26 pkgsrc-2024Q1-base:1.2 pkgsrc-2023Q4:1.2.0.24 pkgsrc-2023Q4-base:1.2 pkgsrc-2023Q3:1.2.0.22 pkgsrc-2023Q3-base:1.2 pkgsrc-2023Q2:1.2.0.20 pkgsrc-2023Q2-base:1.2 pkgsrc-2023Q1:1.2.0.18 pkgsrc-2023Q1-base:1.2 pkgsrc-2022Q4:1.2.0.16 pkgsrc-2022Q4-base:1.2 pkgsrc-2022Q3:1.2.0.14 pkgsrc-2022Q3-base:1.2 pkgsrc-2022Q2:1.2.0.12 pkgsrc-2022Q2-base:1.2 pkgsrc-2022Q1:1.2.0.10 pkgsrc-2022Q1-base:1.2 pkgsrc-2021Q4:1.2.0.8 pkgsrc-2021Q4-base:1.2 pkgsrc-2021Q3:1.2.0.6 pkgsrc-2021Q3-base:1.2 pkgsrc-2021Q2:1.2.0.4 pkgsrc-2021Q2-base:1.2 pkgsrc-2021Q1:1.2.0.2 pkgsrc-2021Q1-base:1.2 pkgsrc-2020Q4:1.1.0.42 pkgsrc-2020Q4-base:1.1 pkgsrc-2020Q3:1.1.0.40 pkgsrc-2020Q3-base:1.1 pkgsrc-2020Q2:1.1.0.36 pkgsrc-2020Q2-base:1.1 pkgsrc-2020Q1:1.1.0.16 pkgsrc-2020Q1-base:1.1 pkgsrc-2019Q4:1.1.0.38 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.34 pkgsrc-2019Q3-base:1.1 pkgsrc-2019Q2:1.1.0.32 pkgsrc-2019Q2-base:1.1 pkgsrc-2019Q1:1.1.0.30 pkgsrc-2019Q1-base:1.1 pkgsrc-2018Q4:1.1.0.28 pkgsrc-2018Q4-base:1.1 pkgsrc-2018Q3:1.1.0.26 pkgsrc-2018Q3-base:1.1 pkgsrc-2018Q2:1.1.0.24 pkgsrc-2018Q2-base:1.1 pkgsrc-2018Q1:1.1.0.22 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.20 pkgsrc-2017Q4-base:1.1 pkgsrc-2017Q3:1.1.0.18 pkgsrc-2017Q3-base:1.1 pkgsrc-2017Q2:1.1.0.14 pkgsrc-2017Q2-base:1.1 pkgsrc-2017Q1:1.1.0.12 pkgsrc-2017Q1-base:1.1 pkgsrc-2016Q4:1.1.0.10 pkgsrc-2016Q4-base:1.1 pkgsrc-2016Q3:1.1.0.8 pkgsrc-2016Q3-base:1.1 pkgsrc-2016Q2:1.1.0.6 pkgsrc-2016Q2-base:1.1 pkgsrc-2016Q1:1.1.0.4 pkgsrc-2016Q1-base:1.1 pkgsrc-2015Q4:1.1.0.2 pkgsrc-2015Q4-base:1.1; locks; strict; comment @# @; 1.2 date 2021.01.19.21.05.22; author adam; state Exp; branches; next 1.1; commitid X32CG1NTEGA5EnEC; 1.1 date 2015.12.02.18.22.10; author drochner; state Exp; branches; next ; commitid Mf7ZrF4T7GvS0pLy; desc @@ 1.2 log @py-ply: updated to 3.11 Version 3.11 ------------ Fixed some minor bugs related to re flags and token order. Added a set_lexpos() method to grammar symbols. Mostly minor bug fixes and small code cleanups. Version 3.10 ------------ Changed grammar signature computation to not involve hashing functions. Parts are just combined into a big string. Fixed Issue 101: Incorrect shift-reduce conflict resolution with precedence specifier. PLY was incorrectly resolving shift-reduce conflicts in certain cases. For example, in the example/calc/calc.py example, you could trigger it doing this: calc > -3 - 4 1 (correct answer should be -7) calc > Issue and suggested patch contributed by https://github.com/RomaVis Version 3.9 ----------- Exposed the parser state number as the parser.state attribute in productions and error functions. For example: def p_somerule(p): ''' rule : A B C ''' print('State:', p.parser.state) May address issue 65 (publish current state in error callback). Fixed Issue 88. Python3 compatibility with ply/cpp. Fixed Issue 93. Ply can crash if SyntaxError is raised inside a production. Not actually sure if the original implementation worked as documented at all. Yacc has been modified to follow the spec as outlined in the CHANGES noted for 11/27/07 below. Fixed Issue 97. Failure with code validation when the original source files aren't present. Validation step now ignores the missing file. Minor fixes to version numbers. @ text @PLY is yet another implementation of lex and yacc for Python. Some notable features include the fact that its implemented entirely in Python and it uses LALR(1) parsing which is efficient and well suited for larger grammars. PLY provides most of the standard lex/yacc features including support for empty productions, precedence rules, error recovery, and support for ambiguous grammars. PLY is extremely easy to use and provides very extensive error checking. It is compatible with both Python 2 and Python 3. @ 1.1 log @add py-ply-3.8, a lex/yacc parser for Python, from Ura Hiroshi per pkgsrc-wip @ text @d1 7 a7 2 PLY is a 100% Python implementation of the common parsing tools lex and yacc. Here are a few highlights: d9 2 a10 27 - PLY is very closely modeled after traditional lex/yacc. If you know how to use these tools in C, you will find PLY to be similar. - PLY provides *very* extensive error reporting and diagnostic information to assist in parser construction. The original implementation was developed for instructional purposes. As a result, the system tries to identify the most common types of errors made by novice users. - PLY provides full support for empty productions, error recovery, precedence specifiers, and moderately ambiguous grammars. - Parsing is based on LR-parsing which is fast, memory efficient, better suited to large grammars, and which has a number of nice properties when dealing with syntax errors and other parsing problems. Currently, PLY builds its parsing tables using the LALR(1) algorithm used in yacc. - PLY uses Python introspection features to build lexers and parsers. This greatly simplifies the task of parser construction since it reduces the number of files and eliminates the need to run a separate lex/yacc tool before running your program. - PLY can be used to build parsers for "real" programming languages. Although it is not ultra-fast due to its Python implementation, PLY can be used to parse grammars consisting of several hundred rules (as might be found for a language like C). The lexer and LR parser are also reasonably efficient when parsing typically sized programs. People have used PLY to build parsers for C, C++, ADA, and other real programming languages. @