aboutsummaryrefslogtreecommitdiff
path: root/third_party/ply/test/lex_token2.py
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/ply/test/lex_token2.py')
-rw-r--r--third_party/ply/test/lex_token2.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/third_party/ply/test/lex_token2.py b/third_party/ply/test/lex_token2.py
new file mode 100644
index 00000000..6e65ab0f
--- /dev/null
+++ b/third_party/ply/test/lex_token2.py
@@ -0,0 +1,22 @@
+# lex_token2.py
+#
+# Tests for tokens of wrong type
+
+import sys
+if ".." not in sys.path: sys.path.insert(0,"..")
+
+import ply.lex as lex
+
+tokens = "PLUS MINUS NUMBER"
+
+t_PLUS = r'\+'
+t_MINUS = r'-'
+t_NUMBER = r'\d+'
+
+def t_error(t):
+ pass
+
+
+lex.lex()
+
+