summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert internal imports to relative imports, to support projects that ↵ptmcg2020-05-138-25/+101
| | | | vendor pyparsing
* Added unit test for modified countedArray metadata (#209)ptmcg2020-05-131-0/+61
|
* Parser Element and Keyword tests (#199)Matt Carmody2020-05-121-4/+263
| | | | | | | | | | | | | | | | | * Expand Keyword unit test * Add ParserElement add unit tests * Add ParserElement sub unit tests * Add ParserElement mul unit tests * Add ParserElement Match First unit tests * Add ParserElement Match Longest unit tests * Add ParserElement Each unit tests * Refactor and cleanup
* Pop counter token and return rest instead of dropping all tokens in ↵Marcin Jaworski2020-05-033-9/+10
| | | | | | | | | | | | | 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
* import and exception types cleanup in statemachine examplesptmcg2020-04-272-1/+2
|
* black cleanupptmcg2020-04-261-1/+1
|
* change some lambdas to explicit methods for clarity (see discussion in ↵ptmcg2020-04-2611-226/+100
| | | | #207); deleted duplicated examples (commit *all* changes this time)
* Code cleanup in examples; move test code into main for ↵ptmcg2020-04-251-18/+25
| | | | bigquery_view_parser.py; change some lambdas to explicit methods for clarity (some discussion in #207); deleted duplicated examples
* Fixed bug in ParseResults repr() which showed all matching entries for a ↵ptmcg2020-04-105-6/+37
| | | | results name, even if listAllMatches was set to False (Issue #205)
* enable packrat parsing in all examples using infixNotationptmcg2020-04-076-5/+23
|
* prep for next release version developmentptmcg2020-04-071-2/+2
|
* Fold in 2.4.7 change notes for consolidate change listptmcg2020-04-051-0/+12
|
* Thanks for the helpptmcg2020-04-051-0/+7
|
* Staging changes for 3.0.0a1 alpha pre-releaseptmcg2020-04-053-5/+4
|
* Enhanced error messages and error locations when parsing fails on the ↵ptmcg2020-04-034-21/+109
| | | | 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-313-80/+105
| | | | instance method on ParseBaseException
* Add OnlyOnce docstring, error message and unit test (#193)Matt Carmody2020-03-312-1/+35
|
* Add ParseResults unit tests (#198)Matt Carmody2020-03-311-0/+182
| | | | | | | | | | | | | | | | | | | | | | | | | * Add ParseResults.__new__() unit tests * Add reversed(ParseResults) unit test * Add ParseResults.values() unit test * Add ParseResults.append() unit test * Add ParseResults.clear() unit test * Add ParseResults.extend() unit tests * Add ParseResults.from_dict() unit test * Add dir(ParseResults) unit test * Add ParseResults.insert() unit test * Minor clean up * Fix dependency on dict order-preservation * Changes to incorporate notes
* Fix potential FutureWarning with generated regex; minor reformat of runTests ↵ptmcg2020-03-293-23/+35
| | | | 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-232-2/+6
| | | | pyparsing_common. Issue #194.
* Blacken unit test changesptmcg2020-03-221-13/+26
|
* Fixup matchPreviousExpr testsptmcg2020-03-221-67/+31
|
* New unit tests (#192)Matt Carmody2020-03-222-0/+197
| | | | | | | | | | | | | | | | | | | * 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-213-103/+45
| | | | | | | | | * 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
* Blacken changesptmcg2020-02-232-5/+10
|
* Update changes to reflect recent bug fix workptmcg2020-02-231-0/+5
|
* Fix bug in Each when using Regex, Regex would get parsed twice (issue #183)ptmcg2020-02-232-15/+46
|
* Fix bug in delta_time when number of seconds/minutes/hours > 999 (confusion ↵ptmcg2020-02-231-5/+16
| | | | with 24-hour time)
* Test code cleanup; remove VERBOSE global and activate all related print() ↵Paul McGuire2020-02-231-75/+86
| | | | statements; remove dead ParseTest class; cleanup testSkipToParserTests test using assertRaisesParseException; fix parsers in pickle compatibility tests, and remove PickleTest_Greeting class as ParseResults wrapper; change test classes created using type() with more explicit class definitions
* Cleanup (object) from class definitions; add __slots__ to ↵Paul McGuire2020-02-232-12/+17
| | | | _ParseResultsWithOffset, and streamline args for ParseResults.__new__
* ensure test can fail (#178)Kyle Lahnakoski2020-02-231-102/+93
|
* Add Black formatting Git hook (#180)Kyle Lahnakoski2020-02-234-1/+19
| | | | | | | | | | | | | | | | | | * add black git hook * test change * test instructions, fix instructions * spelling * make tox and pre-commit agree on line length * start guessing what the line length parameter really is * 80 char line length * 88?
* Add unit tests to expand test coverage (#184)Matt Carmody2020-02-232-2/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Add unit test sequences for small and unbounded packrat cachesptmcg2020-02-041-0/+33
|
* Shorten pyparsing tracebacks, to clear out internal pyparsing calls; plus ↵ptmcg2020-02-014-5/+23
| | | | some micro-optimizations when using packrat parsing
* Update unit tests to use pyparsing_test assert methodsPaul McGuire2020-01-271-111/+77
|
* Some unittest.TestCase cleanups (#175); black reformat of core.pyptmcg2020-01-262-269/+254
|
* Added new warning 'warn_on_match_first_with_lshift_operator' to warn when ↵ptmcg2020-01-264-28/+68
| | | | doing `fwd << a | b`; fixed potential FutureWarning when including unescaped '[' in a regex range definition.
* Smedberg/various minor fixes (#173)Michael Smedberg2020-01-231-40/+87
| | | | | | | | | | | | * Support whitespace in column identifier * Support WITH clause nested in UNION clause * SELECT statements can be surrounded by parenthesis * Parse quoted table names * Formatting code with `black`
* Add security policyptmcg2020-01-121-0/+11
|
* Create FUNDING.ymlPaul McGuire2020-01-111-0/+12
| | | Add Tidelift sponsorship link
* Update version timestamp, since numerous changes have been madeptmcg2020-01-041-1/+1
|
* Break up testMiscellaneousParserTests unit test into separate test methodsptmcg2020-01-041-252/+237
|
* Rollforward infixNotation ternary op fix from 2.4.6 branch, plus related ↵ptmcg2020-01-045-6/+52
| | | | 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.