diff options
Diffstat (limited to 'examples/uri.rl')
-rw-r--r-- | examples/uri.rl | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/examples/uri.rl b/examples/uri.rl deleted file mode 100644 index 185a76c..0000000 --- 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 )?; -}%% |