pyparsing 3.2.2__tar.gz → 3.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. {pyparsing-3.2.2 → pyparsing-3.2.3}/CHANGES +9 -1
  2. {pyparsing-3.2.2 → pyparsing-3.2.3}/PKG-INFO +1 -1
  3. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/__init__.py +2 -2
  4. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/helpers.py +19 -8
  5. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/test_unit.py +22 -0
  6. {pyparsing-3.2.2 → pyparsing-3.2.3}/.coveragerc +0 -0
  7. {pyparsing-3.2.2 → pyparsing-3.2.3}/.gitignore +0 -0
  8. {pyparsing-3.2.2 → pyparsing-3.2.3}/.pre-commit-config.yaml +0 -0
  9. {pyparsing-3.2.2 → pyparsing-3.2.3}/BUILDING.md +0 -0
  10. {pyparsing-3.2.2 → pyparsing-3.2.3}/CODE_OF_CONDUCT.rst +0 -0
  11. {pyparsing-3.2.2 → pyparsing-3.2.3}/CONTRIBUTING.md +0 -0
  12. {pyparsing-3.2.2 → pyparsing-3.2.3}/LICENSE +0 -0
  13. {pyparsing-3.2.2 → pyparsing-3.2.3}/README.rst +0 -0
  14. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/CODE_OF_CONDUCT.rst +0 -0
  15. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/HowToUsePyparsing.rst +0 -0
  16. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/Makefile +0 -0
  17. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/_static/pyparsingClassDiagram_1.5.2.jpg +0 -0
  18. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/_static/pyparsingClassDiagram_3.0.9.jpg +0 -0
  19. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/_static/sql_railroad.html +0 -0
  20. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/conf.py +0 -0
  21. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/index.rst +0 -0
  22. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/make_sphinx_docs.bat +0 -0
  23. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/modules.rst +0 -0
  24. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/pyparsing.rst +0 -0
  25. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/pyparsing_class_diagram.puml +0 -0
  26. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/whats_new_in_3_0_0.rst +0 -0
  27. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/whats_new_in_3_1.rst +0 -0
  28. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/whats_new_in_3_2.rst +0 -0
  29. {pyparsing-3.2.2 → pyparsing-3.2.3}/docs/whats_new_in_x_x_template.rst.txt +0 -0
  30. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/AcManForm.dfm +0 -0
  31. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/LAparser.py +0 -0
  32. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/README.md +0 -0
  33. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/Setup.ini +0 -0
  34. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/SimpleCalc.py +0 -0
  35. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/SingleForm.dfm +0 -0
  36. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/TAP.py +0 -0
  37. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/TAP_diagram.html +0 -0
  38. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/__init__.py +0 -0
  39. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/adventureEngine.py +0 -0
  40. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/adventure_game_parser_diagram.html +0 -0
  41. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/antlr_grammar.py +0 -0
  42. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/antlr_grammar_diagram.html +0 -0
  43. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/antlr_grammar_tests.py +0 -0
  44. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/apicheck.py +0 -0
  45. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/apicheck_diagram.html +0 -0
  46. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/bf.py +0 -0
  47. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/bf_diagram.html +0 -0
  48. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/bigquery_view_parser.py +0 -0
  49. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/booleansearchparser.py +0 -0
  50. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/btpyparse.py +0 -0
  51. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/builtin_parse_action_demo.py +0 -0
  52. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/cLibHeader.py +0 -0
  53. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/chemical_formulas.html +0 -0
  54. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/chemical_formulas.py +0 -0
  55. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/commasep.py +0 -0
  56. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/complex_chemical_formulas.py +0 -0
  57. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/complex_chemical_formulas_diagram.html +0 -0
  58. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/configParse.py +0 -0
  59. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/cpp_enum_parser.py +0 -0
  60. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/cuneiform_python.py +0 -0
  61. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/datetime_parse_actions.py +0 -0
  62. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/decaf_parser.py +0 -0
  63. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/decaf_parser_diagram.html +0 -0
  64. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/delta_time.py +0 -0
  65. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/delta_time_diagram.html +0 -0
  66. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/dfmparse.py +0 -0
  67. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/dhcpd_leases_parser.py +0 -0
  68. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/dictExample.py +0 -0
  69. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/dictExample2.py +0 -0
  70. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/directx_x_file_parser.html +0 -0
  71. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/directx_x_file_parser.py +0 -0
  72. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/ebnf.py +0 -0
  73. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/ebnf_diagram.html +0 -0
  74. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/ebnf_number_parser_diagram.html +0 -0
  75. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/ebnf_number_words.py +0 -0
  76. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/ebnftest.py +0 -0
  77. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/email_address_parser.py +0 -0
  78. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/eval_arith.py +0 -0
  79. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/excel_expr.py +0 -0
  80. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/fourFn.py +0 -0
  81. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/gen_ctypes.py +0 -0
  82. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/getNTPserversNew.py +0 -0
  83. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/greeting.py +0 -0
  84. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/greetingInGreek.py +0 -0
  85. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/greetingInKorean.py +0 -0
  86. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/groupUsingListAllMatches.py +0 -0
  87. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/hola_mundo.py +0 -0
  88. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/html_stripper.py +0 -0
  89. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/html_table_parser.py +0 -0
  90. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/httpServerLogParser.py +0 -0
  91. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/idlParse.py +0 -0
  92. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/include_preprocessor.py +0 -0
  93. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/indentedGrammarExample.py +0 -0
  94. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/indented_block_example.py +0 -0
  95. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/infix_math_parser.py +0 -0
  96. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/inv_regex.py +0 -0
  97. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/javascript_grammar.g +0 -0
  98. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/jsonParser.py +0 -0
  99. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/left_recursion.py +0 -0
  100. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/lineno_example.py +0 -0
  101. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/listAllMatches.py +0 -0
  102. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/lox_parser.py +0 -0
  103. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/lox_parser_diagram.html +0 -0
  104. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/lua_parser.py +0 -0
  105. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/lua_parser_diagram.html +0 -0
  106. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/lucene_grammar.py +0 -0
  107. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/lucene_grammar_diagram.html +0 -0
  108. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/macro_expander.py +0 -0
  109. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/make_diagram.py +0 -0
  110. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/matchPreviousDemo.py +0 -0
  111. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/mongodb_query_expression.html +0 -0
  112. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/mongodb_query_expression.py +0 -0
  113. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/mongodb_query_expression_step_0.py +0 -0
  114. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/mozilla.ics +0 -0
  115. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/mozillaCalendarParser.py +0 -0
  116. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/nested.py +0 -0
  117. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/nested_markup.py +0 -0
  118. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/number_words.py +0 -0
  119. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/number_words_diagram.html +0 -0
  120. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/numerics.py +0 -0
  121. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/oc.py +0 -0
  122. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/one_to_ninety_nine.py +0 -0
  123. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/parseTabularData.py +0 -0
  124. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/parse_python_value.html +0 -0
  125. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/parse_python_value.py +0 -0
  126. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/parse_results_sum_example.py +0 -0
  127. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/partial_gene_match.py +0 -0
  128. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/pgn.py +0 -0
  129. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/position.py +0 -0
  130. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/protobuf_parser.py +0 -0
  131. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/pythonGrammarParser.py +0 -0
  132. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/railroad_diagram_demo.py +0 -0
  133. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/range_check.py +0 -0
  134. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/readJson.py +0 -0
  135. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/removeLineBreaks.py +0 -0
  136. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/roman_numerals.py +0 -0
  137. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/roman_numerals_diagram.html +0 -0
  138. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/rosettacode.py +0 -0
  139. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/rosettacode_diagram.html +0 -0
  140. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/scanExamples.py +0 -0
  141. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/searchParserAppDemo.py +0 -0
  142. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/searchparser.py +0 -0
  143. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/select_parser.py +0 -0
  144. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/sexpParser.py +0 -0
  145. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/shapes.py +0 -0
  146. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/simpleArith.py +0 -0
  147. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/simpleBool.py +0 -0
  148. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/simpleSQL.py +0 -0
  149. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/simpleWiki.py +0 -0
  150. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/snmp_api.h +0 -0
  151. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/sql2dot.py +0 -0
  152. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/stackish.py +0 -0
  153. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/statemachine/documentSignoffDemo.py +0 -0
  154. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/statemachine/documentsignoffstate.pystate +0 -0
  155. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/statemachine/libraryBookDemo.py +0 -0
  156. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/statemachine/librarybookstate.pystate +0 -0
  157. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/statemachine/statemachine.py +0 -0
  158. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/statemachine/trafficLightDemo.py +0 -0
  159. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/statemachine/trafficlightstate.pystate +0 -0
  160. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/statemachine/vending_machine.py +0 -0
  161. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/statemachine/video_demo.py +0 -0
  162. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/statemachine/videostate.pystate +0 -0
  163. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/tag_emitter.py +0 -0
  164. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/tag_metadata.py +0 -0
  165. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/tag_metadata_diagram.html +0 -0
  166. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/test_bibparse.py +0 -0
  167. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/unicode_denormalizer.py +0 -0
  168. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/urlExtractor.py +0 -0
  169. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/urlExtractorNew.py +0 -0
  170. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/verilog_parse.py +0 -0
  171. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/withAttribute.py +0 -0
  172. {pyparsing-3.2.2 → pyparsing-3.2.3}/examples/wordsToNum.py +0 -0
  173. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/actions.py +0 -0
  174. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/common.py +0 -0
  175. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/core.py +0 -0
  176. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/diagram/__init__.py +0 -0
  177. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/exceptions.py +0 -0
  178. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/py.typed +0 -0
  179. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/results.py +0 -0
  180. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/testing.py +0 -0
  181. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/tools/__init__.py +0 -0
  182. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/tools/cvt_pyparsing_pep8_names.py +0 -0
  183. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/unicode.py +0 -0
  184. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyparsing/util.py +0 -0
  185. {pyparsing-3.2.2 → pyparsing-3.2.3}/pyproject.toml +0 -0
  186. {pyparsing-3.2.2 → pyparsing-3.2.3}/readthedocs.yaml +0 -0
  187. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/README.md +0 -0
  188. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/__init__.py +0 -0
  189. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/diag_embed.html +0 -0
  190. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/diag_no_embed.html +0 -0
  191. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/json_parser_tests.py +0 -0
  192. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/karthik.ini +0 -0
  193. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/mypy-ignore-cases/forward_methods.py +0 -0
  194. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/parsefiletest_input_file.txt +0 -0
  195. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/requirements.txt +0 -0
  196. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/test_diagram.py +0 -0
  197. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/test_examples.py +0 -0
  198. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/test_matplotlib_cases.py +0 -0
  199. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/test_pep8_converter.py +0 -0
  200. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/test_simple_unit.py +0 -0
  201. {pyparsing-3.2.2 → pyparsing-3.2.3}/tests/test_util.py +0 -0
  202. {pyparsing-3.2.2 → pyparsing-3.2.3}/tox.ini +0 -0
@@ -35,7 +35,7 @@ Required Python versions by pyparsing version
35
35
  +--------------------------------------------------+-------------------+
36
36
  | pyparsing version | Required Python |
37
37
  +==================================================+===================+
38
- | 3.2.0 - 3.2.2 | 3.9 or later |
38
+ | 3.2.0 - later | 3.9 or later |
39
39
  | 3.0.8 - 3.1.4 | 3.6.8 or later |
40
40
  | 3.0.0 - 3.0.7 (these versions are discouraged) | 3.6 or later |
41
41
  | 2.4.7 | 2.7 or later |
@@ -43,6 +43,14 @@ Required Python versions by pyparsing version
43
43
  +--------------------------------------------------+-------------------+
44
44
 
45
45
 
46
+ Version 3.2.3 - March, 2025
47
+ ---------------------------
48
+ - Fixed bug released in 3.2.2 in which `nested_expr` could overwrite parse actions
49
+ for defined content, and could truncate list of items within a nested list.
50
+ Fixes Issue #600, reported by hoxbro and luisglft, with helpful diag logs and
51
+ repro code.
52
+
53
+
46
54
  Version 3.2.2 - March, 2025
47
55
  ---------------------------
48
56
  - Released `cvt_pyparsing_pep8_names.py` conversion utility to upgrade pyparsing-based
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyparsing
3
- Version: 3.2.2
3
+ Version: 3.2.3
4
4
  Summary: pyparsing module - Classes and methods to define and execute parsing grammars
5
5
  Author-email: Paul McGuire <ptmcg.gm+pyparsing@gmail.com>
6
6
  Requires-Python: >=3.9
@@ -120,8 +120,8 @@ class version_info(NamedTuple):
120
120
  return f"{__name__}.{type(self).__name__}({', '.join('{}={!r}'.format(*nv) for nv in zip(self._fields, self))})"
121
121
 
122
122
 
123
- __version_info__ = version_info(3, 2, 2, "final", 1)
124
- __version_time__ = "22 Mar 2025 22:09 UTC"
123
+ __version_info__ = version_info(3, 2, 3, "final", 1)
124
+ __version_time__ = "25 Mar 2025 01:38 UTC"
125
125
  __version__ = __version_info__.__version__
126
126
  __versionTime__ = __version_time__
127
127
  __author__ = "Paul McGuire <ptmcg.gm+pyparsing@gmail.com>"
@@ -418,6 +418,8 @@ def locatedExpr(expr: ParserElement) -> ParserElement:
418
418
  )
419
419
 
420
420
 
421
+ # define special default value to permit None as a significant value for
422
+ # ignore_expr
421
423
  _NO_IGNORE_EXPR_GIVEN = NoMatch()
422
424
 
423
425
 
@@ -498,11 +500,13 @@ def nested_expr(
498
500
  """
499
501
  if ignoreExpr != ignore_expr:
500
502
  ignoreExpr = ignore_expr if ignoreExpr is _NO_IGNORE_EXPR_GIVEN else ignoreExpr
503
+
501
504
  if ignoreExpr is _NO_IGNORE_EXPR_GIVEN:
502
505
  ignoreExpr = quoted_string()
503
506
 
504
507
  if opener == closer:
505
508
  raise ValueError("opening and closing strings cannot be the same")
509
+
506
510
  if content is None:
507
511
  if isinstance(opener, str_type) and isinstance(closer, str_type):
508
512
  opener = typing.cast(str, opener)
@@ -519,8 +523,11 @@ def nested_expr(
519
523
  )
520
524
  )
521
525
  else:
522
- content = empty.copy() + CharsNotIn(
523
- opener + closer + ParserElement.DEFAULT_WHITE_CHARS
526
+ content = Combine(
527
+ Empty()
528
+ + CharsNotIn(
529
+ opener + closer + ParserElement.DEFAULT_WHITE_CHARS
530
+ )
524
531
  )
525
532
  else:
526
533
  if ignoreExpr is not None:
@@ -544,10 +551,12 @@ def nested_expr(
544
551
  raise ValueError(
545
552
  "opening and closing arguments must be strings if no content expression is given"
546
553
  )
547
- if ParserElement.DEFAULT_WHITE_CHARS:
548
- content.set_parse_action(
549
- lambda t: t[0].strip(ParserElement.DEFAULT_WHITE_CHARS)
550
- )
554
+
555
+ # for these internally-created context expressions, simulate whitespace-skipping
556
+ if ParserElement.DEFAULT_WHITE_CHARS:
557
+ content.set_parse_action(
558
+ lambda t: t[0].strip(ParserElement.DEFAULT_WHITE_CHARS)
559
+ )
551
560
 
552
561
  ret = Forward()
553
562
  if ignoreExpr is not None:
@@ -556,7 +565,9 @@ def nested_expr(
556
565
  )
557
566
  else:
558
567
  ret <<= Group(Suppress(opener) + ZeroOrMore(ret | content) + Suppress(closer))
568
+
559
569
  ret.set_name(f"nested {opener}{closer} expression")
570
+
560
571
  # don't override error message from content expressions
561
572
  ret.errmsg = None
562
573
  return ret
@@ -621,7 +632,7 @@ def _makeTags(tagStr, xml, suppress_LT=Suppress("<"), suppress_GT=Suppress(">"))
621
632
 
622
633
 
623
634
  def make_html_tags(
624
- tag_str: Union[str, ParserElement]
635
+ tag_str: Union[str, ParserElement],
625
636
  ) -> tuple[ParserElement, ParserElement]:
626
637
  """Helper to construct opening and closing tag expressions for HTML,
627
638
  given a tag name. Matches tags in either upper or lower case,
@@ -648,7 +659,7 @@ def make_html_tags(
648
659
 
649
660
 
650
661
  def make_xml_tags(
651
- tag_str: Union[str, ParserElement]
662
+ tag_str: Union[str, ParserElement],
652
663
  ) -> tuple[ParserElement, ParserElement]:
653
664
  """Helper to construct opening and closing tag expressions for XML,
654
665
  given a tag name. Matches tags only in the given upper/lower case.
@@ -5463,6 +5463,28 @@ class Test02_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase):
5463
5463
  # make sure things have been put back properly
5464
5464
  self.assertEqual(pp.ParserElement.DEFAULT_WHITE_CHARS, prior_ws_chars)
5465
5465
 
5466
+ def testNestedExpressions4(self):
5467
+ allowed = pp.alphas
5468
+ plot_options_short = pp.nestedExpr('[',
5469
+ ']',
5470
+ content=pp.OneOrMore(pp.Word(allowed) ^ pp.quotedString)
5471
+ ).setResultsName('plot_options')
5472
+
5473
+ self.assertParseAndCheckList(
5474
+ plot_options_short,
5475
+ "[slkjdfl sldjf [lsdf'lsdf']]",
5476
+ [['slkjdfl', 'sldjf', ['lsdf', "'lsdf'"]]]
5477
+ )
5478
+
5479
+ def testNestedExpressionDoesNotOverwriteParseActions(self):
5480
+ content = pp.Word(pp.nums + " ")
5481
+
5482
+ content.add_parse_action(lambda t: None)
5483
+ orig_pa = content.parseAction[0]
5484
+
5485
+ expr = pp.nested_expr(content=content)
5486
+ assert content.parseAction[0] is orig_pa
5487
+
5466
5488
  def testWordMinMaxArgs(self):
5467
5489
  parsers = [
5468
5490
  "A" + pp.Word(pp.nums),
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes