summaryrefslogtreecommitdiff
path: root/pyparsing/helpers.py
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Update docstrings to use new-style snake_case namesptmcg2021-09-021-2/+2
|
* mypy cleanupptmcg2021-09-021-4/+11
|
* Fix annotations using Iterable, must import and use as IterableType so as ↵ptmcg2021-08-231-1/+1
| | | | not to confuse with collections.abc.Iterable.
* Adding type annotationsptmcg2021-08-231-26/+55
|
* Fix f-string 3.6 compat bug in test_unit.py; rename __versionTime__ to ↵ptmcg2021-08-161-6/+6
| | | | __version_time__; code cleanups
* Sweep code for usage of Optional -> Opt; sweep HowToUsePyparsing.rst for ↵ptmcg2021-08-081-16/+16
| | | | legacy names
* Sweep code for calls using legacy namesptmcg2021-08-081-15/+30
|
* Add PEP-8 naming, with compatibility synonymsptmcg2021-08-071-145/+190
|
* Add allowTrailingDelim to delimitedList helper (#285)Kazantcev Andrey2021-07-291-4/+17
| | | Merge pull request #285 - Add allowTrailingDelim to delimitedList helper
* Deprecate `locatedExpr` in favor of new `Located` classptmcg2020-12-241-1/+3
|
* Add IndentedBlock class; made vertical keyword arg more visible when ↵pyparsing_3.0.0b1ptmcg2020-11-021-1/+36
| | | | creating railroad diags; changed create_diagram from monkeypatch to included method on ParserElement; better debug exception if Dict is constructed with non-Group expression
* minor perf changes IIptmcg2020-10-251-5/+7
|
* Fix enum auto() incompat with Py3.5Paul McGuire2020-08-191-2/+2
|
* Convert SyntaxWarnings to ValueError and TypeError exceptions; change ↵Paul McGuire2020-08-191-13/+7
| | | | diagnostics to an enum, and add enable_diag(), disable_diag() and enable_all_warnings() methods; clean up pyparsing imports in test_unit.py
* Docstrings cleanup; add 'encoding' argument to parseFile; additional unit ↵ptmcg2020-07-081-31/+30
| | | | tests to improve ParseResults coverage
* infixNotation unit tests require infixNotation bug fixes!ptmcg2020-07-071-14/+11
|
* Convert internal imports to relative imports, to support projects that ↵ptmcg2020-05-131-2/+15
| | | | vendor pyparsing