diff options
author | Nathan Binkert <nate@binkert.org> | 2009-08-16 13:39:58 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2009-08-16 13:39:58 -0700 |
commit | e1270f81bdc81f5a575b34c2d2c294bdde3e6f4f (patch) | |
tree | b54af3469a338609faf04e67603c5264e79d59a5 /ext/ply/test/calclex.py | |
parent | bcaf93d182f43bf72d52104bb909324945904120 (diff) | |
download | gem5-e1270f81bdc81f5a575b34c2d2c294bdde3e6f4f.tar.xz |
ply: update PLY to version 3.2
Diffstat (limited to 'ext/ply/test/calclex.py')
-rw-r--r-- | ext/ply/test/calclex.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/ply/test/calclex.py b/ext/ply/test/calclex.py index d3e873266..67d245f19 100644 --- a/ext/ply/test/calclex.py +++ b/ext/ply/test/calclex.py @@ -3,7 +3,7 @@ # ----------------------------------------------------------------------------- import sys -sys.path.append("..") +if ".." not in sys.path: sys.path.insert(0,"..") import ply.lex as lex tokens = ( @@ -28,7 +28,7 @@ def t_NUMBER(t): try: t.value = int(t.value) except ValueError: - print "Integer value too large", t.value + print("Integer value too large %s" % t.value) t.value = 0 return t @@ -37,11 +37,11 @@ t_ignore = " \t" def t_newline(t): r'\n+' t.lineno += t.value.count("\n") - + def t_error(t): - print "Illegal character '%s'" % t.value[0] + print("Illegal character '%s'" % t.value[0]) t.lexer.skip(1) - + # Build the lexer lex.lex() |