summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorDavid Beazley <dave@dabeaz.com>2008-02-28 20:08:40 +0000
committerDavid Beazley <dave@dabeaz.com>2008-02-28 20:08:40 +0000
commited1cb91715f6cd6fb368e8f624158b1614420687 (patch)
tree74d8549a720ec66e43ef57140411fb0d2db535f8 /example
parent29c3673964f97bb8cc9446a44b93ff6087e0f6eb (diff)
downloadply-ed1cb91715f6cd6fb368e8f624158b1614420687.tar.gz
Fixed bug with nonassoc precedence
Diffstat (limited to 'example')
-rw-r--r--example/BASIC/basic.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/example/BASIC/basic.py b/example/BASIC/basic.py
index 6a2f489..4b3675d 100644
--- a/example/BASIC/basic.py
+++ b/example/BASIC/basic.py
@@ -12,7 +12,12 @@ import basinterp
# If a runtime error occurs, we bail out and enter
# interactive mode below
if len(sys.argv) == 2:
- data = open(sys.argv[1]).read()
+ import os,mmap
+ data = mmap.mmap(os.open(sys.argv[1],os.O_RDONLY),
+ os.path.getsize(sys.argv[1]),
+ access=mmap.ACCESS_READ)
+
+# data = open(sys.argv[1]).read()
prog = basparse.parse(data)
if not prog: raise SystemExit
b = basinterp.BasicInterpreter(prog)