-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blank space added #131
blank space added #131
Conversation
basic-expr = exist-expr / paren-expr / (neg-op paren-expr) / relation-expr | ||
basic-expr = exist-expr / | ||
[neg-op] paren-expr / | ||
relation-expr | ||
exist-expr = [neg-op] path ; path existence or non-existence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definition of exist-expr
might be not necessary with
basic-expr = [neg-op] path / ; path existence or non-existence
[neg-op] paren-expr /
relation-expr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree exist-expr
isn't formally necessary, but it gives us a place to highlight the purpose of the syntax and to give it a meaningful name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that was what I was thinking ... agreed, so let it in.
@@ -534,8 +534,7 @@ member value of the input | |||
node corresponding to the member name `"a"`. | |||
The result is again a list of one node: `[{"b":0},{"b":1},{"c":2}]`. | |||
|
|||
Next, `[*]` selects from any input node which is an array and selects all the elements | |||
of the input node. | |||
Next, `[*]` selects from any input node — either an array or an object — all its elements or members. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't select members, only member values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I overlooked, that Glyn's original text was correct, as he was referring to that specific example. So possibly better
Next, `[*]` selects from any input node — an array here — all its elements.
@cabo is right regarding members though.
@@ -1000,7 +997,7 @@ as many times in the node list. | |||
The filter selector has the form `[?<expr>]`. It works via iterating over structured values, i.e. arrays and objects. | |||
|
|||
~~~~ abnf | |||
filter-selector = "[?" boolean-expr "]" | |||
filter-selector = "[?" S boolean-expr S "]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So no space between [
and ?
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no ... might be an extension to the standard making no harm.
; binds more tightly than disjunction | ||
|
||
basic-expr = exist-expr / paren-expr / (neg-op paren-expr) / relation-expr | ||
basic-expr = exist-expr / |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style comment: I have tried to indicate ABNF operator precedence using parentheses. Maybe not needed here because of the grouping into lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR could be merged to make progress. Further changes as indicated by @cabo are probably needed, either now or in a subsequent PR.
Indeed. I'll do a small PR with my points. |
a little late to the party ... thanks |
... and some minor edits ...