summaryrefslogtreecommitdiff
path: root/src/pyparsing.py
Commit message (Collapse)AuthorAgeFilesLines
* Add minor enht for infixNotation, to accept a sequence of parse actions at ↵ptmcg2017-03-061-5/+10
| | | | | | each precedence level git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@460 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Prep for 2.2.0 releaseptmcg2017-03-031-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@459 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fix error and expand docstring examples for ParserElement.searchStringptmcg2017-03-031-1/+5
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@458 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fix deprecated use of '\' as described in https://bugs.python.org/issue27364 ↵ptmcg2017-02-281-4/+4
| | | | | | (Deprecated in Python 3.6, will become SyntaxError in a future release) git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@456 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Minor change when using '-' operator, to be compatible with ↵ptmcg2017-02-281-1/+1
| | | | | | ParserElement.streamline() method. git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@454 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fix KeyError when packrat cache gets updated recursivelyptmcg2017-02-281-5/+20
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@453 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fix docstring formatting for epydoc compatibilityptmcg2016-10-071-2/+2
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@450 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fix @(*#&$#& typoptmcg2016-10-061-4/+2
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@449 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Add example to LineStart docstringptmcg2016-10-061-0/+19
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@448 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fixed bug in col, which allowed simplification of LineStart down to minimal ↵ptmcg2016-10-061-9/+3
| | | | | | implementation git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@447 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fixed behavior of LineStart; added AutoReset to other unit tests that modify ↵ptmcg2016-10-041-10/+8
| | | | | | global state in pyparsing; also, disable output buffering in unit tests when specific test classes are given to build the test suite git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@446 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fix all bare 'except:' statements in pyparsing; add more 'n-or-more' unit testsptmcg2016-10-021-10/+10
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@445 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fix bug in ZeroOrMore results name reportingptmcg2016-09-281-6/+3
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@444 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fixed bug in ParseResults.dump when keys were not strings. Also changed ↵ptmcg2016-09-241-3/+7
| | | | | | display of string values to show them in quotes, to help distinguish parsed numeric strings from parsed integers that have been converted to Python ints. git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@443 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Added support for multiline test strings in runTestsptmcg2016-09-111-1/+9
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@437 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fix typo in doc string; add comment on support for ()'s in infixNotationptmcg2016-09-111-4/+5
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@435 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Cleanup/notes in prep for 2.1.9 releaseptmcg2016-09-101-2/+2
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@432 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fix Py3 bug in ParseResults.getName; fixed bug in Keyword and ↵ptmcg2016-09-081-5/+7
| | | | | | CaselessKeyword when using setDefaultKeywordChars. git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@429 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Copied upcaseTokens and downcaseTokens to pyparsing_common; renamed ↵ptmcg2016-08-261-11/+27
| | | | | | pyparsing_common's signedInteger and sciReal to signed_integer and sci_real git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@428 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Added CloseMatch classptmcg2016-08-171-3/+64
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@425 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Some docstring changesptmcg2016-08-151-11/+34
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@424 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Some docstring changesptmcg2016-08-141-9/+11
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@422 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* enhanced runTests to better handle non-parsing exceptionsptmcg2016-08-141-3/+17
| | | | | | modified pyparsing_common.convertToDate and convertToDatetime parse actions to convert ValueErrors raised by strptime to ParseExceptions git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@419 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Simplified merging ParseResults from expressions in an Each; also fixed ↵ptmcg2016-08-131-40/+31
| | | | | | class hierarchy for OneOrMore vs. ZeroOrMore, which was causing ZeroOrMore expressions to be treated as required expressions in an Each git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@416 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Add limit=n args to extract_stack and extract_tb calls, to minimize scanning ↵ptmcg2016-08-121-7/+7
| | | | | | through full call stack - trying to address UnicodeDecodeError exceptions from loading in more code than we need. git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@415 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Clearer example output in ParseResultsptmcg2016-08-111-15/+18
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@414 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Added inline doc example for ParserElement.setDebugptmcg2016-08-111-2/+31
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@413 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fixed bug in ParserElement.inlineLiteralsUsing, causing infinite loop with ↵ptmcg2016-08-111-3/+6
| | | | | | | | Suppress; added AutoReset context manager class to unit tests, for saving/resetting global state when tests need to change globals git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@412 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Undo removal of generator handlingptmcg2016-08-111-1/+5
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@408 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Remove dangling ref to _generatorTypeptmcg2016-08-111-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@407 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Add support for all iterables (sets, generators, etc.) to oneOf and ↵ptmcg2016-08-111-11/+6
| | | | | | ParseExpression git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@406 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fix regression when using packrat parsing and raising ParseSyntaxException ↵ptmcg2016-08-091-11/+17
| | | | | | in And._ErrorStop. git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@403 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Typo in Keyword docstringptmcg2016-08-071-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@399 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* docstring tweak (ParseResults.asDict)ptmcg2016-08-071-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@398 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* More docstring cleanup/enhancementptmcg2016-08-071-27/+45
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@397 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fix typo in SkipTo docstringptmcg2016-08-071-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@396 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Reformat Word docstring to include links to helper stringsptmcg2016-08-071-9/+10
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@394 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Add the last of the new inline doc examplesptmcg2016-08-061-57/+469
| | | | | | Added full option to ParseResults.dump(), and fullDump option to ParserElement.runTests git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@392 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Add more inline doc examplesptmcg2016-08-061-36/+286
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@391 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fixed version dateptmcg2016-08-061-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@390 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Add inline examples to docstrings, for realptmcg2016-08-051-481/+1094
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@389 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Fixed bug in upcaseTokens and downcaseTokens introduced in 2.1.5, when the ↵ptmcg2016-08-051-2/+2
| | | | | | parse action was used in conjunction with results names git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@388 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Add inline examples to docstrings, so that reference docs will show sample ↵ptmcg2016-08-051-8/+8
| | | | | | code along with arg and usage descriptions - hopefully this will make them generally more useful, or at least a little less dry. git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@387 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Deprecated ParseResults.asXML ptmcg2016-08-051-2/+2
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@386 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Updated traceParseAction to use repr of input/output tokens instead of strptmcg2016-08-051-3/+3
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@385 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Rename pyparsing_common's "numeric" and "number" expressions to "number" and ↵ptmcg2016-08-051-5/+5
| | | | | | "fnumber", to better indicate which expression forces conversion to float (that is fnumber) git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@384 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* LRU rework to use OrderedDict instead, better cross-version Python ↵ptmcg2016-08-041-41/+86
| | | | | | compatibility. git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@382 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Modified init for Py2 compatibility (need args attribute for exception ↵ptmcg2016-07-271-0/+1
| | | | | | construction during packratting) git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@378 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Final code cleanup for adding lru_cache. Removed DictCache wrapper on dict, ↵ptmcg2016-07-271-43/+29
| | | | | | just changed LruDictCache look more dict-like. Made container cacheing a little more explicit with variable names and comments. Added note to CHANGES file. git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@377 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b
* Rework to use lru_cache instead of TTLCacheptmcg2016-07-271-70/+62
| | | | git-svn-id: svn://svn.code.sf.net/p/pyparsing/code/trunk@376 9bf210a0-9d2d-494c-87cf-cfb32e7dff7b