aboutsummaryrefslogtreecommitdiff
path: root/examples/working
diff options
context:
space:
mode:
authorDrahflow <drahflow@gmx.de>2013-04-16 23:20:41 +0200
committerDrahflow <drahflow@gmx.de>2013-04-16 23:20:41 +0200
commit50a8cffc4af2301d89dcc5ccab05cece55ddbcd2 (patch)
tree56aaad15799607d8d794556301af68f953f5f182 /examples/working
parent8a848799e6db6c4a77ceaf256c29ac38a5b465e1 (diff)
Regex support for all lexing regexes
Diffstat (limited to 'examples/working')
-rw-r--r--examples/working/regex.ey31
1 files changed, 30 insertions, 1 deletions
diff --git a/examples/working/regex.ey b/examples/working/regex.ey
index 5d0992d..0cd916a 100644
--- a/examples/working/regex.ey
+++ b/examples/working/regex.ey
@@ -4,5 +4,34 @@
{ "([d-h][d-h])(.*)" regex } { dump } loop
"abcdefghijklmnopqrstuvwxyz"
{ "^(...)(.*)" regex } { dump } loop
-"abcdefghijklmnopqrstuvwxyz"
+"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"(...)$" regex { dump } rep
+
+" code"
+{ _ "^ (.*)" regex } { -01 -- } loop dump
+"# comment"
+"^#" regex dump
+"1234 remaining"
+"^(\\d+) +(.*)" regex dump dump dump
+"\"stringcontent..."
+"^\"(.*)" regex dump dump
+"\\\\remaining"
+"^\\\\\\\\(.*)" regex dump dump
+"\\nremaining"
+"^\\\\n(.*)" regex dump dump
+"\\0foo"
+"^\\\\0(.*)" regex dump dump
+"\\0"
+"^\\\\0(.*)" regex dump dump
+"\\\"remaining"
+"^\\\\\"(.*)" regex dump dump
+"abcdef"
+{ "([^c])(.*)" regex } { dump } loop
+"...stringcontent\""
+{ "^([^\"\\\\])(.*)" regex } { dump } loop
+"/quoted123 remaining"
+"^([^a-zA-Z0-9 ]+)([a-zA-Z0-9][^ ]*) +(.*)" regex dump dump dump
+"unquoted remaining"
+"^([a-zA-Z0-9]+|[^a-zA-Z0-9 ]+) +(.*)" regex dump dump dump
+"+++ remaining"
+"^([a-zA-Z0-9]+|[^a-zA-Z0-9 ]+) +(.*)" regex dump dump dump