summaryrefslogtreecommitdiff
path: root/tests/lex_dup1.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lex_dup1.py')
-rw-r--r--tests/lex_dup1.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/lex_dup1.py b/tests/lex_dup1.py
new file mode 100644
index 0000000..b9dc3c5
--- /dev/null
+++ b/tests/lex_dup1.py
@@ -0,0 +1,26 @@
+# lex_dup1.py
+#
+# Duplicated rule specifiers
+
+import ply.lex as lex
+
+tokens = [
+ "PLUS",
+ "MINUS",
+ "NUMBER",
+ ]
+
+t_PLUS = r'\+'
+t_MINUS = r'-'
+t_NUMBER = r'\d+'
+
+t_NUMBER = r'\d+'
+
+def t_error(t):
+ pass
+
+
+
+lex.lex()
+
+