From 6a899ffd880d7937e6e8fd540552c65f945dce53 Mon Sep 17 00:00:00 2001 From: Paul McGuire Date: Mon, 26 Aug 2019 10:53:50 -0500 Subject: Fixed bug when ZeroOrMore parses no matching exprs, did not include a named result containing [] --- pyparsing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pyparsing.py') diff --git a/pyparsing.py b/pyparsing.py index c2f1f5a..31a1560 100644 --- a/pyparsing.py +++ b/pyparsing.py @@ -96,7 +96,7 @@ classes inherit from. Use the docstrings for examples of how to: """ __version__ = "3.0.0a1" -__versionTime__ = "26 Aug 2019 01:46 UTC" +__versionTime__ = "26 Aug 2019 11:15 UTC" __author__ = "Paul McGuire " import string @@ -4615,7 +4615,7 @@ class ZeroOrMore(_MultipleMatch): try: return super().parseImpl(instring, loc, doActions) except (ParseException, IndexError): - return loc, [] + return loc, ParseResults([], name=self.resultsName) def __str__(self): if hasattr(self, "name"): -- cgit v1.2.1