Created
June 29, 2010 01:17
-
-
Save kriszyp/456646 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query = and | |
# Normalized components | |
nchar = unreserved / pct-encoded | |
name = *nchar | |
value = *nchar / typed-value / array | |
typed-value = *nchar ":" *nchar | |
array = "(" [ value *( "," value ) ] ")" | |
call = name "(" [ argument *( "," argument ) ] ")" | |
argument = call / value | |
pct-encoded = "%" HEXDIG HEXDIG | |
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" | |
# Sugar components | |
comparison = name ( "=" [ name "=" ] ) value | |
operator = comparison / call / group | |
and = operator *( "&" operator ) | |
or = operator *( "|" operator ) | |
group = "(" ( and / or ) ")" |
I didn't think we could formally have < and > as part of RQL since they aren't URI delimiters, but maybe we can.
The standard FIQL syntax is handled by the "comparison" construct.
I think that "*" and "+" should be added to the unreserved or nchar.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Wow, this is surprisingly short!
I don't see anything re: the sugar ops like >, <=, and the FIQL stuff but I guess that isn't strictly necessary.
Does query = and suggest that the top level can only & terms together? That keeps things simple.
Are those really the only unreserved chars available? Perhaps it's safer to specify unreserved than to go short on a list of reserved chars.