diff options
author | ptmcg <ptmcg@austin.rr.com> | 2019-01-07 19:27:27 -0600 |
---|---|---|
committer | ptmcg <ptmcg@austin.rr.com> | 2019-01-07 19:27:27 -0600 |
commit | e29bb653ee93e09ad8bdf2e28ce3236105795b68 (patch) | |
tree | 4ce1361fe7ccfb2f5ee53cbadf87f320d2802eba /pyparsing.py | |
parent | ed7c6205b1aaa3d749ba783d267a511ed438b2a0 (diff) | |
download | pyparsing-git-e29bb653ee93e09ad8bdf2e28ce3236105795b68.tar.gz |
Fix inconsistency between Keyword(caseless=True) and CaselessKeyword (issue #65)
Diffstat (limited to 'pyparsing.py')
-rw-r--r-- | pyparsing.py | 8 |
1 files changed, 1 insertions, 7 deletions
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 <ptmcg@users.sourceforge.net>" 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. |