mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-18 15:34:09 +01:00
19 lines
426 B
Plaintext
19 lines
426 B
Plaintext
@top url { Protocol? Host Port? Path? Query? }
|
|
|
|
Query {
|
|
"?" queryPair ("&" queryPair)*
|
|
}
|
|
|
|
@tokens {
|
|
Protocol { $[a-zA-Z]+ "://" }
|
|
Path { ("/" $[a-zA-Z0-9\-_.]*)+ }
|
|
queryPair { ($[a-zA-Z0-9]+ ("=" $[a-zA-Z0-9]*)?) }
|
|
Port { ":" $[0-9]+ }
|
|
Host { $[a-zA-Z0-9-_.]+ }
|
|
|
|
// Protocol/host overlaps, so give proto explicit precedence
|
|
@precedence { Protocol, Host }
|
|
}
|
|
|
|
@external propSource highlight from "./highlight"
|