Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Doc updates, remove references to deprecated delimitedList and ↵ | ptmcg | 2023-04-19 | 1 | -4/+4 |
| | | | | delimited_list (use DelimitedList class) | ||||
* | Fix regex matching for Python quoted strings | ptmcg | 2023-04-18 | 1 | -4/+4 |
| | |||||
* | Fix railroad so head, body args included in html (#479) | Aussie Schnore | 2023-04-18 | 1 | -2/+2 |
| | |||||
* | Blacken | ptmcg | 2023-04-03 | 1 | -1/+0 |
| | |||||
* | Small perf optimization for `expr | ""` mapping to `Optional(expr)` | ptmcg | 2023-03-29 | 1 | -0/+3 |
| | |||||
* | Fix #474 - redo QuotedString '\' escape handling as a state machine so that ↵ | ptmcg | 2023-03-28 | 1 | -9/+27 |
| | | | | all transforms are done left to right | ||||
* | Fix #475 - SkipTo used incorrect storage of ignore expressions, would match ↵ | ptmcg | 2023-03-26 | 1 | -11/+6 |
| | | | | the target expression if present within an ignorable | ||||
* | Don't always override exception messages in MatchFirst or Or classes - ↵ | ptmcg | 2023-03-07 | 1 | -2/+7 |
| | | | | addresses #464 | ||||
* | Add ParseResults.deepcopy() - fixes #463 | ptmcg | 2023-03-06 | 1 | -2/+3 |
| | |||||
* | Remove future import annotations - fixes #465 | ptmcg | 2023-02-12 | 1 | -3/+2 |
| | |||||
* | Fix some type annotations; fixes Issue #456 | ptmcg | 2022-12-22 | 1 | -12/+16 |
| | |||||
* | Added DelimitedList class, for better handling of naming and diagramming ↵ | ptmcg | 2022-12-11 | 1 | -0/+65 |
| | | | | (replaces delimited_list function) | ||||
* | Additional measures to prevent premature streamlining (Issue #447) | ptmcg | 2022-11-10 | 1 | -3/+4 |
| | |||||
* | Deprecate ParserElement.validate() (Issue #444) | ptmcg | 2022-11-06 | 1 | -0/+20 |
| | |||||
* | Added new class method `ParserElement.using_each` | ptmcg | 2022-11-06 | 1 | -0/+12 |
| | |||||
* | Add doc and error message clarifications about Word with as_keyword=True. ↵ | ptmcg | 2022-07-18 | 1 | -2/+4 |
| | | | | Fixes #433. | ||||
* | Add type annotations | ptmcg | 2022-07-14 | 1 | -33/+67 |
| | |||||
* | Add recurse option to set_debug(), fixes #399 | ptmcg | 2022-07-11 | 1 | -1/+25 |
| | |||||
* | Some micro-optimizations | ptmcg | 2022-07-09 | 1 | -15/+15 |
| | |||||
* | Simpler fix for __new__ with copy.copy() (#427) | Devin J. Pohly | 2022-07-09 | 1 | -8/+4 |
| | |||||
* | Small docstring formatting/syntax fixes (#426) | Devin J. Pohly | 2022-07-09 | 1 | -4/+4 |
| | | | | | ``...`` needs to be surrounded by non-word characters to be detected, and backslash-space in a non-raw Python string should technically be written backslash-backslash-space. | ||||
* | Add return of NotImplemented to other binary operators (similar to PR #425), ↵ | ptmcg | 2022-07-04 | 1 | -0/+20 |
| | | | | and add unit tests | ||||
* | Return NotImplemented for unsupported operations (#425) | Devin J. Pohly | 2022-07-04 | 1 | -36/+12 |
| | | | Fixes #424. | ||||
* | Added python_quoted_string; fixed exception messages for ParseElementEnhance ↵ | ptmcg | 2022-06-29 | 1 | -3/+26 |
| | | | | subclasses | ||||
* | Remove assignment to __class__ in Word, remove internal _WordRegex class | ptmcg | 2022-06-24 | 1 | -11/+4 |
| | |||||
* | Simplify code that incrementally builds a ParseResults | ptmcg | 2022-06-23 | 1 | -4/+2 |
| | |||||
* | Additional docstring and sphinx cleanup | ptmcg | 2022-06-18 | 1 | -2/+2 |
| | |||||
* | There will be black | ptmcg | 2022-06-17 | 1 | -3/+0 |
| | |||||
* | Explicitly declare compatibility alias functions (#414) | Devin J. Pohly | 2022-06-17 | 1 | -35/+124 |
| | | | | | 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. | ||||
* | Fix docstring synonyms for parseString, scanString, et al.; refactor ↵ | ptmcg | 2022-06-17 | 1 | -6/+6 |
| | | | | replaces_prePEP8_function decorator to handle new methods correctly | ||||
* | Add mypy ignore directives for intentional Python rule-bending | ptmcg | 2022-06-16 | 1 | -10/+13 |
| | |||||
* | Cleanup docstrings using replaces_prePEP8_function decorator; and black | ptmcg | 2022-06-16 | 1 | -30/+29 |
| | |||||
* | Use Literal.__new__ to select optimized subclasses (#413) | Devin J. Pohly | 2022-06-16 | 1 | -19/+37 |
| | | | | | | | | | | | | | | | | | | | * Use Literal.__new__ to select optimized subclasses This turns Literal() into a factory which creates an object of the appropriate type from the start, rather than having to overwrite the __class__ attribute later. * Fix Literal.__copy__() Instance attributes from superclasses weren't being transferred to the copy. Regression test included. * Make Empty a subclass of Literal This unifies the logic with other optimized literal classes like _SingleCharLiteral, and it seemed right in terms of a type relationship. * Style | ||||
* | Clean up docstrings to use new PEP8 names instead of old camelCase names | ptmcg | 2022-06-16 | 1 | -8/+8 |
| | |||||
* | Fix up docstrings for deprecated functions (doc as deprecated, instead of ↵ | ptmcg | 2022-06-16 | 1 | -2/+3 |
| | | | | duplicating actual function doc) - issue #411 | ||||
* | fix Sphinx errors/warnings (#410) | Devin J. Pohly | 2022-06-10 | 1 | -6/+8 |
| | | | | | | 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`). | ||||
* | Fix Word(max=2) (issue #409); create re for Word(exact=n) exprs; validate ↵ | ptmcg | 2022-06-10 | 1 | -22/+32 |
| | | | | that min <= max if both given | ||||
* | Fix list formatting in docstrings (#407) | Devin J. Pohly | 2022-06-07 | 1 | -26/+37 |
| | | | | | | | | | * Fix list formatting in docstrings A few docstrings were missing a blank line before lists, causing the start of the list to be parsed by RST as a continuation of the previous line. * add backticks to parameter names in lists | ||||
* | Convert most str.format() calls to use f-strings | ptmcg | 2022-05-30 | 1 | -129/+69 |
| | |||||
* | More added type annotations; reworked Word.__init__ so that excludeChars ↵ | ptmcg | 2022-05-29 | 1 | -50/+53 |
| | | | | exclusion code is clearer | ||||
* | Fix/ignore mypy attr-defined errors, where attr definitions are intentional | ptmcg | 2022-05-29 | 1 | -2/+5 |
| | |||||
* | Fix type annotations of Forward dunder-methods (#402) | Stephen Rosen | 2022-05-29 | 1 | -3/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix type annotations of Forward dunder-methods The `__lshift__`, `__ilshift__`, and `__or__` methods each return a ParserElement object, but have no annotated return type. The result is that the following code will not type check: def foo() -> pp.ParserElement: expr = pp.Forward() expr <<= bar() return expr | pp.Literal("baz") whereas the code will type check if the return line is changed to return pp.MatchFirst([expr, pp.Literal("baz")]) This is a bug in the types which can be resolved fairly simply with some return type annotations. Testing is more complicated. Testing annotation accuracy is a relatively novel space with a few options, none of which can be considered standard as of yet. Many solutions require learning a new toolchain only for that purpose. However, one of the lower-impact options is to use `mypy --warn-unused-ignores` to check that annotations satisfy some constraints. This isn't the most precise test possible, but it's simple and uses a widely known and familiar tool for the job. `tox -e mypy-tests` is a new tox env which calls `mypy` in the desired way. We can confirm with a new test case file that `tox -e mypy-tests` fails prior to this change to `pyparsing/` and that it passes with the change made. * Comment out mypy-test tox env for CI Until CI adjustments are made, it's not possible to add mypy-test to the tox config. It will be run under pypy where it does not work until other changes are made. | ||||
* | Cleaned up/expanded some docstrings and docs to reflect new 3.0.10 changes | ptmcg | 2022-05-20 | 1 | -0/+5 |
| | |||||
* | Add embed argument to create_diagram, to suppress DOCTYPE, HEAD, and BODY tags | ptmcg | 2022-05-20 | 1 | -2/+5 |
| | |||||
* | Make expr[:ender] equivalent to expr[...:ender] | ptmcg | 2022-05-18 | 1 | -2/+4 |
| | |||||
* | Add support for slice in expr[] notation, to pass stop_on repetition sentinel | ptmcg | 2022-05-18 | 1 | -0/+20 |
| | |||||
* | Fixed bug in srange (escaped chars inside range set); fixed ignore type ↵ | ptmcg | 2022-05-14 | 1 | -4/+4 |
| | | | | annotation in SkipTo | ||||
* | Update docstrings, replacing ZeroOrMore and OneOrMore with [...] and [1, ↵ | ptmcg | 2022-04-11 | 1 | -20/+20 |
| | | | | ...] notation | ||||
* | Reworked mypy typing, removed definitions of OptionalType, DictType, and ↵ | ptmcg | 2022-04-11 | 1 | -44/+46 |
| | | | | IterableType | ||||
* | Added show_groups arg to create_diagram; prep for releasepyparsing_3.0.8 | ptmcg | 2022-04-09 | 1 | -1/+3 |
| |