summaryrefslogtreecommitdiff
path: root/ext/ply/test/lex_ignore2.py
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-05-25 19:29:32 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-05-25 19:29:32 -0700
commita3ae9486d543f23cd4203381e7bcf2ce86c51389 (patch)
treed66d3b9851f3002d0746c7af830062480f83773d /ext/ply/test/lex_ignore2.py
parentad02a59f89139a75dfcfaa7a79498e54f7ce7e5d (diff)
parent44ebb8d3e27329e9f0b501897585359b4ab696f2 (diff)
downloadgem5-a3ae9486d543f23cd4203381e7bcf2ce86c51389.tar.xz
Merge zizzer.eecs.umich.edu:/bk/newmem
into doughnut.mwconnections.com:/home/gblack/m5/newmem-x86 --HG-- extra : convert_revision : 276d00a73b1834d5262129c3f7e0f7fae18e23bc
Diffstat (limited to 'ext/ply/test/lex_ignore2.py')
-rw-r--r--ext/ply/test/lex_ignore2.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/ext/ply/test/lex_ignore2.py b/ext/ply/test/lex_ignore2.py
new file mode 100644
index 000000000..fc95bd1e5
--- /dev/null
+++ b/ext/ply/test/lex_ignore2.py
@@ -0,0 +1,29 @@
+# lex_token.py
+#
+# ignore declaration as a raw string
+
+import sys
+sys.path.insert(0,"..")
+
+import ply.lex as lex
+
+tokens = [
+ "PLUS",
+ "MINUS",
+ "NUMBER",
+ ]
+
+t_PLUS = r'\+'
+t_MINUS = r'-'
+t_NUMBER = r'\d+'
+
+t_ignore = r' \t'
+
+def t_error(t):
+ pass
+
+import sys
+
+lex.lex()
+
+