diff options
author | Albert Hofkamp <a.t.hofkamp@tue.nl> | 2017-03-23 08:18:57 +0100 |
---|---|---|
committer | Albert Hofkamp <a.t.hofkamp@tue.nl> | 2017-03-23 08:18:57 +0100 |
commit | a813d9d76a4b67b0f6666c9933a59254a163d19b (patch) | |
tree | 7f23ca45271844247e1fc031d3e2146bfc754926 /ply/lex.py | |
parent | d4c866480ff18263e83df5600f017e6528e8d8ce (diff) | |
download | ply-a813d9d76a4b67b0f6666c9933a59254a163d19b.tar.gz |
Fixes for problems reported by pyflakes3
Diffstat (limited to 'ply/lex.py')
-rw-r--r-- | ply/lex.py | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -531,7 +531,6 @@ def _form_master_re(relist, reflags, ldict, toknames): # calling this with s = "t_foo_bar_SPAM" might return (('foo','bar'),'SPAM') # ----------------------------------------------------------------------------- def _statetoken(s, names): - nonstate = 1 parts = s.split('_') for i, part in enumerate(parts[1:], 1): if part not in names and part != 'ANY': @@ -949,8 +948,6 @@ def lex(module=None, object=None, debug=False, optimize=False, lextab='lextab', # Add rules defined by functions first for fname, f in linfo.funcsym[state]: - line = f.__code__.co_firstlineno - file = f.__code__.co_filename regex_list.append('(?P<%s>%s)' % (fname, _get_regex(f))) if debug: debuglog.info("lex: Adding rule %s -> '%s' (state '%s')", fname, _get_regex(f), state) |