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/example/BASIC/basic.py | |
parent | bcaf93d182f43bf72d52104bb909324945904120 (diff) | |
download | gem5-e1270f81bdc81f5a575b34c2d2c294bdde3e6f4f.tar.xz |
ply: update PLY to version 3.2
Diffstat (limited to 'ext/ply/example/BASIC/basic.py')
-rw-r--r-- | ext/ply/example/BASIC/basic.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/ply/example/BASIC/basic.py b/ext/ply/example/BASIC/basic.py index 3a07acdbf..b14483d2d 100644 --- a/ext/ply/example/BASIC/basic.py +++ b/ext/ply/example/BASIC/basic.py @@ -4,6 +4,9 @@ import sys sys.path.insert(0,"../..") +if sys.version_info[0] >= 3: + raw_input = input + import basiclex import basparse import basinterp @@ -41,7 +44,7 @@ while 1: prog = basparse.parse(line) if not prog: continue - keys = prog.keys() + keys = list(prog) if keys[0] > 0: b.add_statements(prog) else: @@ -58,8 +61,8 @@ while 1: elif stat[0] == 'NEW': b.new() - - + + |