summaryrefslogtreecommitdiff
path: root/pyparsing
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix ParseResults.dump() to show both keys *and* lower-level structuresptmcg2020-06-081-1/+1
|
* Railroad Diagram Improvements (#220)Michael Milton2020-06-032-8/+31
| | | | | | * Add diagram documentation, add more diagram tests, allow more customization of diagrams * Remove accidental edit of unrelated documentation
* Railroad Diagrams (#218)Michael Milton2020-05-312-0/+171
| | | | | | | | | | | | | * Basic framework * Initial effort * Clean up and document code * jinja newline * Pre-commit, and add extras to tox * We can't use the class type-annotations syntax in Python 3.5
* Add misc unit tests for core elements with missing coverage (#214)Matt Carmody2020-05-181-6/+0
| | | | | | | | | | | | | | | | | * Expand testQuotedStrings * Add tests for expr[n] edge cases * Add ParserElement.ignore(str) test * Add Regex invalid type test * Add test for Word with min=0 * Add Char with asKeyword=True test * Add CharsNotIn tests * Remove unused __req__ and __rne__
* Convert internal imports to relative imports, to support projects that ↵ptmcg2020-05-137-25/+38
| | | | vendor pyparsing
* Pop counter token and return rest instead of dropping all tokens in ↵Marcin Jaworski2020-05-031-2/+3
| | | | | | | | | | | | | countedArray (#209) * Pop counter token and return rest instead of dropping all tokens * Include only named results from intExpr in countedArray results * Remove internal Group from countedArray * Fix operator precedence * Update countedArray tests
* remove Regex docstring notes that reference no-longer-supported replacement ↵Paul McGuire2020-04-281-15/+6
| | | | of internal import of re with other RE modules such as regex
* Fixed bug in ParseResults repr() which showed all matching entries for a ↵ptmcg2020-04-103-6/+2
| | | | results name, even if listAllMatches was set to False (Issue #205)
* prep for next release version developmentptmcg2020-04-071-2/+2
|
* Staging changes for 3.0.0a1 alpha pre-releaseptmcg2020-04-051-1/+1
|
* Enhanced error messages and error locations when parsing fails on the ↵ptmcg2020-04-032-20/+42
| | | | Keyword or CaselessKeyword classes due to the presence of a preceding or trailing keyword character. See issue #201.
* Remove deprecated space escapes from docstrings (#202)Matt Carmody2020-04-032-5/+5
|
* Refactor ParseException explain() static method into a staticmethod and an ↵Paul McGuire2020-03-311-73/+87
| | | | instance method on ParseBaseException
* Add OnlyOnce docstring, error message and unit test (#193)Matt Carmody2020-03-311-1/+4
|
* Fix potential FutureWarning with generated regex; minor reformat of runTests ↵ptmcg2020-03-292-23/+29
| | | | output to break at test comments if any
* Docstring formatting changes (#197)Matt Carmody2020-03-295-54/+69
| | | | | | | * Tidy docstring formatting for lists and example codeblock * Add class references and formatting to docstrings * Experimental docstring formatting changes
* Don't import unittest in testing.py (#196)Daniel Wagner-Hall2020-03-241-1/+0
| | | | | | | | | This import is currently unused in the file. I'm looking at optimising start-up times of a project I work on, and importing pyparsing currently takes about 82ms, which is quite a lot for my domain. Just not importing `unittest` shaves 14ms off of that import time.
* Fixed bug in regex definitions for real and sci_real expressions in ↵ptmcg2020-03-231-2/+2
| | | | pyparsing_common. Issue #194.
* New unit tests (#192)Matt Carmody2020-03-221-0/+1
| | | | | | | | | | | | | | | | | | | * Add tests for matchPreviousLiteral - question in comments * Bug fix - matchPreviousLiteral One line fix for scanString of matchPreviousLiteral with mulitple return tokens. Test still needs to be refactored. * Demo 3 issues in matchPreviousLiteral and matchPreviousExpr * Correct mistakes and demonstrate potential matchPreviousExpr issue * Add nestedExpr unit tests * Add makeXMLTags unit test * Add unit tests for oneOf with empty list and int input
* Housekeeping (#191)Matt Carmody2020-03-212-5/+5
| | | | | | | | | * Correct docstring typo in helpers.py * Remove repetitive imports of pyparsing in tests * Move repetitive pyparsing_common calls to module level ppc * Correct docstrings inline code typos
* Fix bug in Each when using Regex, Regex would get parsed twice (issue #183)ptmcg2020-02-231-2/+2
|
* Cleanup (object) from class definitions; add __slots__ to ↵Paul McGuire2020-02-232-12/+17
| | | | _ParseResultsWithOffset, and streamline args for ParseResults.__new__
* Add unit tests to expand test coverage (#184)Matt Carmody2020-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add unit test for pop with invalid named arg * Add unit test for setParseAction() with uncallable arg * Add unit test for __mul__ with negative number * Add unit test for __mul__ with Ellipsis * Add unit tests for matchOnlyAtCol * Add unit tests for convertToDate and converToDatetime * blacken the new tests * Add unit test for assertParseAndCheckDict * Update with feedback from ptmcg Removed unnecessary imports Replaced exception prints with ptmcg's assertRaises override * blacken updates * Update tests with additional feedback Change assertRaises(ParseException) to assertRaisesParseException() Return exception in overrided assertRaises
* Rename (#179)Kyle Lahnakoski2020-02-231-84/+87
| | | | | | | | | | | | | | * change names of vars * add `__slots__` * remove doinit, use `__new__` * use set, not dict * black formatting * shorter names, but keep descriptive names
* Shorten pyparsing tracebacks, to clear out internal pyparsing calls; plus ↵ptmcg2020-02-013-5/+18
| | | | some micro-optimizations when using packrat parsing
* Some unittest.TestCase cleanups (#175); black reformat of core.pyptmcg2020-01-261-3/+9
|
* Added new warning 'warn_on_match_first_with_lshift_operator' to warn when ↵ptmcg2020-01-262-10/+14
| | | | doing `fwd << a | b`; fixed potential FutureWarning when including unescaped '[' in a regex range definition.
* Update version timestamp, since numerous changes have been madeptmcg2020-01-041-1/+1
|
* Rollforward infixNotation ternary op fix from 2.4.6 branch, plus related ↵ptmcg2020-01-042-3/+7
| | | | unit test; change TestParseResultsAsserts to mixin instead of subclass; rollforward 2.4.6 CHANGES blurb from 2.4.6 branch
* Correct typos in White.whiteStrs definition (#172)eboth2019-12-121-18/+18
| | | The unicode entities in whiteStr were incorrectly defined, leading to an exception when constructing White instances with these entities.
* Break up pyparsing.py monolith into sub-modules in a pyparsing package (#162)Paul McGuire2019-11-1810-0/+7844
* Break up pyparsing.py monolith into sub-modules in a pyparsing package * Convert relative imports to absolutes * Reference submodule pyparsing in setup.py modules * Remove recursive import of pyparsing from setup.py * Black updates * setup.py updates - packages vs. modules. use .dev1 for the version