summaryrefslogtreecommitdiff
path: root/test/lex_state_noerror.py
diff options
context:
space:
mode:
authorDavid Beazley <dave@dabeaz.com>2008-05-29 14:00:14 +0000
committerDavid Beazley <dave@dabeaz.com>2008-05-29 14:00:14 +0000
commit3d91085e98cd5d2ddd3822793ab33bbad8287f5c (patch)
tree81d1988b5dec2f2b51c465527a3fe103847808b0 /test/lex_state_noerror.py
parent912137883ba0ec6e0f0390c9664a7918ee529c14 (diff)
downloadply-3d91085e98cd5d2ddd3822793ab33bbad8287f5c.tar.gz
Revamped testing framework
Diffstat (limited to 'test/lex_state_noerror.py')
-rw-r--r--test/lex_state_noerror.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/lex_state_noerror.py b/test/lex_state_noerror.py
index 853b157..2cb008b 100644
--- a/test/lex_state_noerror.py
+++ b/test/lex_state_noerror.py
@@ -1,9 +1,9 @@
-# lex_state2.py
+# lex_state_noerror.py
#
# Declaration of a state for which no rules are defined
import sys
-sys.path.insert(0,"..")
+if ".." not in sys.path: sys.path.insert(0,"..")
import ply.lex as lex
@@ -13,7 +13,6 @@ tokens = [
"NUMBER",
]
-comment = 1
states = (('comment', 'exclusive'),)
t_PLUS = r'\+'
@@ -34,7 +33,6 @@ def t_comment_body_part(t):
def t_error(t):
pass
-import sys
lex.lex()