summaryrefslogtreecommitdiff
path: root/examples/uri.rl
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2020-10-10 11:52:31 -0700
committerAdrian Thurston <thurston@colm.net>2020-10-10 11:52:31 -0700
commitbbf93e620923bc5a0dac5e890f37ee693b31d806 (patch)
tree1a4e41a02e49cf146587b2ea3f4bdb2638434c3e /examples/uri.rl
parent8eddf92bd3a370cfbc41e45d7cd4319fb20ba766 (diff)
downloadcolm-bbf93e620923bc5a0dac5e890f37ee693b31d806.tar.gz
removed ragel examples left over from time repos were one
Diffstat (limited to 'examples/uri.rl')
-rw-r--r--examples/uri.rl31
1 files changed, 0 insertions, 31 deletions
diff --git a/examples/uri.rl b/examples/uri.rl
deleted file mode 100644
index 185a76c6..00000000
--- a/examples/uri.rl
+++ /dev/null
@@ -1,31 +0,0 @@
-%%{
- machine uri;
-
- action scheme {}
- action loc {}
- action item {}
- action query {}
- action last {}
- action nothing {}
-
- main :=
- # Scheme machine. This is ambiguous with the item machine. We commit
- # to the scheme machine on colon.
- ( [^:/?#]+ ':' @(colon,1) @scheme )?
-
- # Location machine. This is ambiguous with the item machine. We remain
- # ambiguous until a second slash, at that point and all points after
- # we place a higher priority on staying in the location machine over
- # moving into the item machine.
- ( ( '/' ( '/' [^/?#]* ) $(loc,1) ) %loc %/loc )?
-
- # Item machine. Ambiguous with both scheme and location, which both
- # get a higher priority on the characters causing ambiguity.
- ( ( [^?#]+ ) $(loc,0) $(colon,0) %item %/item )?
-
- # Last two components, the characters that initiate these machines are
- # not supported in any previous components, therefore there are no
- # ambiguities introduced by these parts.
- ( '?' [^#]* %query %/query)?
- ( '#' any* %/last )?;
-}%%