Files
yaak-mountain-loop/src-web/components/Editor/url/url.grammar
Gregory Schier f568266c7f Some small tweaks
2023-02-28 17:25:59 -08:00

30 lines
434 B
Plaintext

@top url { Protocol Host Port? Path Query }
Protocol {
"http://" | "https://"
}
Path {
(Slash PathSegment)*
}
Query {
Question (QueryPair)*
}
QueryPair {
Amp? QueryName Equal QueryValue
}
@tokens {
Port { ":" $[0-9]+ }
Host { $[a-zA-Z0-9-_.]+ }
QueryName { $[a-zA-Z0-9-_.]+ }
QueryValue { $[a-zA-Z0-9-_./]+ }
PathSegment { $[a-zA-Z0-9-_.]+ }
Slash { "/" }
Question { "?" }
Equal { "=" }
Amp { "&" }
}