diff options
author | Polina Dudnik <pdudnik@gmail.com> | 2009-08-17 11:33:32 -0500 |
---|---|---|
committer | Polina Dudnik <pdudnik@gmail.com> | 2009-08-17 11:33:32 -0500 |
commit | c438b2e431066d9324238e1c678ef68a3b721f33 (patch) | |
tree | b79e72b3074441ce01d5c95207f96f71d16bed35 /ext/ply/example/BASIC/basic.py | |
parent | 6654fe02daf6285cb43aa1c6e0e35f6c9c8786f1 (diff) | |
parent | a43ae579dd3128a0ced2238532f26d99db197361 (diff) | |
download | gem5-c438b2e431066d9324238e1c678ef68a3b721f33.tar.xz |
Branch Merge
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() - - + + |