summaryrefslogtreecommitdiff
path: root/ext/ply/test/calclex.py
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ply/test/calclex.py')
-rw-r--r--ext/ply/test/calclex.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/ply/test/calclex.py b/ext/ply/test/calclex.py
index f8eb91a09..d3e873266 100644
--- a/ext/ply/test/calclex.py
+++ b/ext/ply/test/calclex.py
@@ -1,6 +1,10 @@
# -----------------------------------------------------------------------------
# calclex.py
# -----------------------------------------------------------------------------
+import sys
+
+sys.path.append("..")
+import ply.lex as lex
tokens = (
'NAME','NUMBER',
@@ -36,10 +40,9 @@ def t_newline(t):
def t_error(t):
print "Illegal character '%s'" % t.value[0]
- t.skip(1)
+ t.lexer.skip(1)
# Build the lexer
-import lex
lex.lex()