summaryrefslogtreecommitdiff
path: root/ply/lex.py
diff options
context:
space:
mode:
authorAlbert Hofkamp <a.t.hofkamp@tue.nl>2017-03-23 08:18:57 +0100
committerAlbert Hofkamp <a.t.hofkamp@tue.nl>2017-03-23 08:18:57 +0100
commita813d9d76a4b67b0f6666c9933a59254a163d19b (patch)
tree7f23ca45271844247e1fc031d3e2146bfc754926 /ply/lex.py
parentd4c866480ff18263e83df5600f017e6528e8d8ce (diff)
downloadply-a813d9d76a4b67b0f6666c9933a59254a163d19b.tar.gz
Fixes for problems reported by pyflakes3
Diffstat (limited to 'ply/lex.py')
-rw-r--r--ply/lex.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/ply/lex.py b/ply/lex.py
index 3e240d1..eb003c2 100644
--- a/ply/lex.py
+++ b/ply/lex.py
@@ -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)