From e29bb653ee93e09ad8bdf2e28ce3236105795b68 Mon Sep 17 00:00:00 2001 From: ptmcg Date: Mon, 7 Jan 2019 19:27:27 -0600 Subject: Fix inconsistency between Keyword(caseless=True) and CaselessKeyword (issue #65) --- pyparsing.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'pyparsing.py') diff --git a/pyparsing.py b/pyparsing.py index b688034..2b071b2 100644 --- a/pyparsing.py +++ b/pyparsing.py @@ -94,7 +94,7 @@ classes inherit from. Use the docstrings for examples of how to: """ __version__ = "2.3.1" -__versionTime__ = "05 Jan 2019 23:47 UTC" +__versionTime__ = "08 Jan 2019 01:25 UTC" __author__ = "Paul McGuire " import string @@ -2734,12 +2734,6 @@ class CaselessKeyword(Keyword): def __init__( self, matchString, identChars=None ): super(CaselessKeyword,self).__init__( matchString, identChars, caseless=True ) - def parseImpl( self, instring, loc, doActions=True ): - if ( (instring[ loc:loc+self.matchLen ].upper() == self.caselessmatch) and - (loc >= len(instring)-self.matchLen or instring[loc+self.matchLen].upper() not in self.identChars) ): - return loc+self.matchLen, self.match - raise ParseException(instring, loc, self.errmsg, self) - class CloseMatch(Token): """A variation on :class:`Literal` which matches "close" matches, that is, strings with at most 'n' mismatching characters. -- cgit v1.2.1