aboutsummaryrefslogtreecommitdiff
path: root/grammars
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-08-01 22:06:33 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-08-01 22:06:33 -0700
commitc608abae65881b0351322491fc854a83c25ca4be (patch)
treeb42cc2fc0447ec7972683efa7c3dee4766fedd39 /grammars
parent1a84ddbaa95893ff952aafe92a1caf851f2db102 (diff)
Micro optimization
Diffstat (limited to 'grammars')
-rw-r--r--grammars/web.bp6
1 files changed, 3 insertions, 3 deletions
diff --git a/grammars/web.bp b/grammars/web.bp
index 0fb74f9..3e47eba 100644
--- a/grammars/web.bp
+++ b/grammars/web.bp
@@ -1,9 +1,9 @@
# This file defines some web-related patterns
url: (
- "file://" +(`/ *url-char)
- / "mailto:" email
- / ("https"/"http"/"ftp") "://" [>..`@ +url-char [`: +url-char] `@]
+ ("https"/"http"/"ftp") "://" [>..`@ +url-char [`: +url-char] `@]
(ipv4/ipv6/domain) [`: int] [url-path]
+ / "mailto:" email
+ / "file://" +(`/ *url-char)
)
url-path: +(`/ *url-char) [`? +(+url-char`=+url-char)%`&]
ipv4: 4 int % `.