diff options
Diffstat (limited to 'ply/lex.py')
-rw-r--r-- | ply/lex.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -184,7 +184,7 @@ class Lexer: tf.write('_lexliterals = %s\n' % repr(self.lexliterals)) tf.write('_lexstateinfo = %s\n' % repr(self.lexstateinfo)) - # Rewrite the lexstatere table, replacing function objects with function names + # Rewrite the lexstatere table, replacing function objects with function names tabre = {} for statename, lre in self.lexstatere.items(): titem = [] @@ -535,7 +535,7 @@ def _statetoken(s, names): for i, part in enumerate(parts[1:], 1): if part not in names and part != 'ANY': break - + if i > 1: states = tuple(parts[1:i]) else: @@ -1096,4 +1096,3 @@ def TOKEN(r): # Alternative spelling of the TOKEN decorator Token = TOKEN - |