summaryrefslogtreecommitdiff
path: root/pyparsing/helpers.py
Commit message (Collapse)AuthorAgeFilesLines
* Doc updates, remove references to deprecated delimitedList and ↵ptmcg2023-04-191-21/+8
| | | | delimited_list (use DelimitedList class)
* Blackenptmcg2023-04-031-0/+1
|
* Added DelimitedList class, for better handling of naming and diagramming ↵ptmcg2022-12-111-83/+32
| | | | (replaces delimited_list function)
* Additional measures to prevent premature streamlining (Issue #447)ptmcg2022-11-101-2/+2
|
* Add type annotationsptmcg2022-07-141-0/+3
|
* Add recurse option to set_debug(), fixes #399ptmcg2022-07-111-0/+1
|
* Fix bug in delimited_list (premature streamline), issue #408ptmcg2022-07-091-1/+29
|
* Additional docstring and sphinx cleanupptmcg2022-06-181-1/+1
|
* More docstring fixesptmcg2022-06-171-4/+7
|
* Explicitly declare compatibility alias functions (#414)Devin J. Pohly2022-06-171-13/+39
| | | | | This allows static type checkers to find and check these functions correctly, and it removes the need to fiddle around with stack frames to get the aliases defined.
* Clean up docstrings to use new PEP8 names instead of old camelCase namesptmcg2022-06-161-3/+3
|
* Fix up docstrings for deprecated functions (doc as deprecated, instead of ↵ptmcg2022-06-161-16/+25
| | | | duplicating actual function doc) - issue #411
* fix Sphinx errors/warnings (#410)Devin J. Pohly2022-06-101-0/+2
| | | | | | Two warnings remain from the Hebrew and Devanagari names in pyparsing_unicode, but those are due to Sphinx using Python's builtin `re` library to parse identifiers (which does not have thorough Unicode handling for `\w`).
* Convert most str.format() calls to use f-stringsptmcg2022-05-301-12/+7
|
* More added type annotations; reworked Word.__init__ so that excludeChars ↵ptmcg2022-05-291-3/+11
| | | | exclusion code is clearer
* Update docstrings, replacing ZeroOrMore and OneOrMore with [...] and [1, ↵ptmcg2022-04-111-2/+2
| | | | ...] notation
* Reworked mypy typing, removed definitions of OptionalType, DictType, and ↵ptmcg2022-04-111-9/+14
| | | | IterableType
* No longer use undocumented module "sre_constants" (#379)Serhiy Storchaka2022-03-291-1/+1
| | | Closes #378.
* Add tests and updated docs for changes to lpar and rpar args to ↵ptmcg2022-03-241-5/+15
| | | | infix_notation; add grouping of non-suppressed tokens with grouped contents
* Fix bug #375 (#376)Philippe PRADOS2022-03-241-2/+4
|
* Clean up dump() examples in docstringsptmcg2022-02-151-4/+4
|
* Updated version number for development; blackening; some timestamp cleanupptmcg2022-02-151-1/+3
|
* Fixed exception generated in a ParserElementEnhance if the contained expr is ↵ptmcg2022-01-181-1/+1
| | | | None
* Fix #345 - delimitedList calling streamline() changes content of expr in ↵ptmcg2021-12-141-1/+1
| | | | some cases; use a copy to generate default expr name
* Added further type annotationsptmcg2021-12-061-1/+1
|
* Added min/max keyword arguments for delimited_list (#335)Marius2021-12-041-1/+11
| | | | | * Added min/max keyword arguments for delimited_list * Rename arguments and add validation
* Revert results names for packaging compatibility (#110)ptmcg2021-11-121-10/+4
|
* Fix delimitedList regression when called with a literal string instead of a ↵ptmcg2021-11-091-1/+4
| | | | ParserElement (Issue #331)
* Added type hints for col, line, and lineno public methods; plus blackptmcg2021-11-021-2/+8
|
* Removed spurious warnings when assigning results name to originalTextFor ↵ptmcg2021-10-311-3/+4
| | | | expression (Issue #110)
* PEP-8 some internal namesptmcg2021-10-311-2/+2
|
* Fix bug where streamline() did not return self if already streamlinedptmcg2021-10-301-1/+1
|
* Fix regex typo in one_of (:? should be (?:ptmcg2021-10-271-1/+1
|
* Fixed IndentedBlockptmcg2021-10-271-35/+0
|
* To blackenptmcg2021-10-261-1/+3
|
* Fix one_of to generate regex internally, even if caseless or as_keyword ↵ptmcg2021-10-261-12/+26
| | | | given as True
* blackeningptmcg2021-10-241-4/+7
|
* Fixed bug where warn_on_multiple_string_args_to_oneof warning is raised even ↵ptmcg2021-10-241-1/+2
| | | | when not enabled
* Clean up warning and exception messages with oneOf -> one_ofptmcg2021-10-231-3/+3
|
* Modified helpers common_html_entity and replace_html_entity() to use the ↵ptmcg2021-10-221-3/+4
| | | | HTML entity definitions from html.entities.html5
* Clean up bullet lists in docstringsptmcg2021-10-021-58/+58
|
* Fixup type annotationsptmcg2021-09-291-1/+1
|
* Blacken and update version timeptmcg2021-09-251-4/+4
|
* Added start_line and end_line args to with_line_numbers, and more docstringptmcg2021-09-251-6/+7
|
* Allow multiplying an expr by 0 or (0,0)ptmcg2021-09-241-5/+6
|
* Fix to IndentedBlock where first line of block was suppressed; use ↵ptmcg2021-09-231-1/+5
| | | | Empty().preParse to advance to printable character if not already there
* The blackeningptmcg2021-09-081-6/+3
|
* Better type matching for infix_notation operator specsptmcg2021-09-081-6/+14
|
* Optimization in infixNotationptmcg2021-09-081-2/+5
|
* 226 railroad updates (#298)Paul McGuire2021-09-081-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add line separators to HowToUsePyparsing.rst to call attention to PEP-8 naming in this document * Update railroad diagram generation code, to show results names as group annotations, and break out all expressions with a name set using setName. * Revert dataclasses back to NamedTuples for 3.6-7 compat; add setName calls in simpleBool.py; add simpleBool to make_diagram.py * Remove default setName calls on delimitedList * Add setName calls to simpleSQL for better diagram * Remove hard-coded debug mode * Move setName on delimitedList into test code * Restore default setName() calls for delimitedList; set default vertical=3; update jsonParser.py and simpleSQL.py with better setName() calls (and update test_diagram.py accordingly); update test_diagram.py to move asserts after tempfiles are written, moved tempfiles to local dir instead of hard-to-find temp dir * Get proper railroad diags for infixNotation * Undo forced railroad_debug * Code cleanup from PR comments * Remove hard-coded base_expr name from infix_notation * Add special EachItem to compose DiagramItem for Group-OneOrMore-Choice; refactored tests to move duplicated code to function; added names to mozillaCalendarParser.py for better diagram * Make sure root element gets in the diagram, even if it has no custom name * Update tests to reflect diagram structure changes * Add LOOKAHEAD and LOOKBEHIND annotations for FollowedBy and PrecededBy elements, and changed the annotation on Each to [ALL]; renamed _first to _element_diagram_states; add expr.streamline() in create_diagram() to collapse nested exprs; added railroad_diagram_demo.py example general blackening; update CHANGES with latest enhancements; bump version date * Fix pip command * Update CHANGES and whats_new_in_3_0_0.rst with some features and acknowledgements * Updates from PR review: change user instructions to use pyparsing[diagrams]; consistent annotations for NotAny along with FollowedBy and PrecededBy; fixed up comments and type annotations * Remove unneeded pip installs for tox (already handled in tox.ini) * Refactor duplicate code into decorator; drop unused group_results_name argument * Add diagram handling for SkipTo, and for And's constructed using `expr*N` notation (use a OneOrMore diagram with a repeat count instead of a sequence of N exprs) * Fix parsing ambiguity in railroad_diagram_demo.py so that parser can actually parse a valid input string