summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Beazley <dave@dabeaz.com>2012-04-18 07:52:38 -0500
committerDavid Beazley <dave@dabeaz.com>2012-04-18 07:52:38 -0500
commit2ded29521dc92f39db5caa3bfd7021f53bb2113d (patch)
tree7b7ada962d77a0f3e411016cce8538d17a8bb5d8 /test
parent9aa428b08436d4bc318557b2964bdddbaf984bcf (diff)
downloadply-2ded29521dc92f39db5caa3bfd7021f53bb2113d.tar.gz
Fixed some minor issues and typos
Diffstat (limited to 'test')
-rw-r--r--test/lex_literal3.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/lex_literal3.py b/test/lex_literal3.py
new file mode 100644
index 0000000..91ab980
--- /dev/null
+++ b/test/lex_literal3.py
@@ -0,0 +1,26 @@
+# lex_literal3.py
+#
+# An empty literal specification given as a list
+# Issue 8 : Literals empty list causes IndexError
+
+import sys
+if ".." not in sys.path: sys.path.insert(0,"..")
+
+import ply.lex as lex
+
+tokens = [
+ "NUMBER",
+ ]
+
+literals = []
+
+def t_NUMBER(t):
+ r'\d+'
+ return t
+
+def t_error(t):
+ pass
+
+lex.lex()
+
+