-
Notifications
You must be signed in to change notification settings - Fork 3
Move grammar entry points text out of 'notes'. Tidy markup. #346
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
Conversation
1538735 to
897284d
Compare
hartig
left a comment
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.
Thanks for your effort!
| <p>The variable `v` must not be in-scope at the point of the | ||
| `(expr AS v)` form. The scoping for `(expr AS v)` | ||
| applies immediately in `SELECT` expressions. | ||
| </p> | ||
| <p>In `BIND (expr AS v)` requires that the variable `v` is not | ||
| in-scope from the preceeding elements in the group graph pattern in which it is used. | ||
| </p> | ||
| <p>In `SELECT`, the variable `v` must not be in-scope in the graph | ||
| pattern of the `SELECT` clause, nor used in another select expression earlier in | ||
| the clause. | ||
| </p> |
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.
| <p>The variable `v` must not be in-scope at the point of the | |
| `(expr AS v)` form. The scoping for `(expr AS v)` | |
| applies immediately in `SELECT` expressions. | |
| </p> | |
| <p>In `BIND (expr AS v)` requires that the variable `v` is not | |
| in-scope from the preceeding elements in the group graph pattern in which it is used. | |
| </p> | |
| <p>In `SELECT`, the variable `v` must not be in-scope in the graph | |
| pattern of the `SELECT` clause, nor used in another select expression earlier in | |
| the clause. | |
| </p> | |
| <p>The variable `v` MUST NOT be in-scope at the point of the | |
| `(expr AS v)` form. The scoping for `(expr AS v)` | |
| applies immediately in `SELECT` expressions. | |
| </p> | |
| <p>In `BIND (expr AS v)`, the variable `v` MUST NOT be | |
| in-scope from the preceding elements in the group graph | |
| pattern in which it is used. | |
| </p> | |
| <p>In `SELECT`, the variable `v` MUST NOT be in-scope in the graph | |
| pattern of the `SELECT` clause, nor be used in another select | |
| expression earlier in the clause. | |
| </p> |
| There are two entry points into the grammar: | ||
| </p> | ||
| <ol> | ||
| <li><a href="#rQueryUnit">`QueryUnit`</a> for the SPARQL query language</li> |
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.
| <li><a href="#rQueryUnit">`QueryUnit`</a> for the SPARQL query language</li> | |
| <li><a href="#rQueryUnit">`QueryUnit`</a> for the SPARQL query language.</li> |
| <li><a href="#rUpdateUnit">`UpdateUnit`</a> for the SPARQL update language.</li> | ||
| </ol> | ||
| <p> | ||
| The SPARQL grammar is LL(1) when the rules with uppercased names are used as terminals. |
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.
| The SPARQL grammar is LL(1) when the rules with uppercased names are used as terminals. | |
| The SPARQL grammar is LL(1) when the rules with uppercase names are used as terminals. |
| </li> | ||
| <li> | ||
| The tokens <a href="#rInsertData">`INSERT DATA`</a>, | ||
| <a href="#rDeleteData">`DELETE DATA`</a> 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.
| <a href="#rDeleteData">`DELETE DATA`</a> and | |
| <a href="#rDeleteData">`DELETE DATA`</a>, and |
| <a href="#rDeleteData">`DELETE DATA`</a> and | ||
| <a href="#rDeleteWhere">`DELETE WHERE`</a> | ||
| allow any amount of white space between the words. | ||
| The single space version is used in the grammar for clarity. |
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.
| The single space version is used in the grammar for clarity. | |
| The single-space version is used in the grammar for clarity. |
| rules both use rule <a href="#rQuads">`Quads`</a>. The rule | ||
| <a href="#rQuadData">`QuadData`</a>, used in | ||
| <a href="#rInsertData">`INSERT DATA`</a> and | ||
| <a href="#rDeleteData">`DELETE DATA`</a> |
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.
| <a href="#rDeleteData">`DELETE DATA`</a> | |
| <a href="#rDeleteData">`DELETE DATA`</a>, |
| Blank node syntax is not allowed in | ||
| <a href="#rDeleteWhere">`DELETE WHERE`</a>, | ||
| the <a href="#rDeleteClause">`DeleteClause`</a> for | ||
| `DELETE`, | ||
| nor in <a href="#rDeleteData">`DELETE DATA`</a>. | ||
| </li> |
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.
There are a few edits which might be applied here. This is my favorite. If there are significant objections, I'll provide other options.
| Blank node syntax is not allowed in | |
| <a href="#rDeleteWhere">`DELETE WHERE`</a>, | |
| the <a href="#rDeleteClause">`DeleteClause`</a> for | |
| `DELETE`, | |
| nor in <a href="#rDeleteData">`DELETE DATA`</a>. | |
| </li> | |
| Blank node syntax is allowed in neither | |
| <a href="#rDeleteWhere">`DELETE WHERE`</a>, | |
| <a href="#rDeleteData">`DELETE DATA`</a>, | |
| nor the <a href="#rDeleteClause">`DeleteClause`</a> for | |
| `DELETE`. | |
| </li> |
| <li> | ||
| The number of variables in the variable list of a | ||
| <a href="#rValuesClause">`VALUES`</a> clause | ||
| must correspond to the number of |
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.
Normative language SHOULD NOT be used unless it is meant normatively. I'm sure I'm not catching all instances.
| must correspond to the number of | |
| MUST correspond to the number of |
| must be unique within that list. | ||
| </li> | ||
| <li> | ||
| Variables introduced by `AS` in a | ||
| <a href="#rSelectClause">`SELECT`</a> clause | ||
| must not already be <a href="#variableScope">in-scope</a>. | ||
| </li> | ||
| <li> | ||
| The variable assigned in a <a href="#rBind">`BIND`</a> clause | ||
| must not already be in-use within the immediately preceding |
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.
| must be unique within that list. | |
| </li> | |
| <li> | |
| Variables introduced by `AS` in a | |
| <a href="#rSelectClause">`SELECT`</a> clause | |
| must not already be <a href="#variableScope">in-scope</a>. | |
| </li> | |
| <li> | |
| The variable assigned in a <a href="#rBind">`BIND`</a> clause | |
| must not already be in-use within the immediately preceding | |
| MUST be unique within that list. | |
| </li> | |
| <li> | |
| Variables introduced by `AS` in a | |
| <a href="#rSelectClause">`SELECT`</a> clause | |
| MUST NOT already be <a href="#variableScope">in-scope</a>. | |
| </li> | |
| <li> | |
| The variable assigned in a <a href="#rBind">`BIND`</a> clause | |
| MUST NOT already be in-use within the immediately preceding |
| The expression argument of an aggregate function can not | ||
| contain an aggregate function. | ||
| </li> | ||
| <li> | ||
| Only custom aggregate functions use the `DISTINCT` keyword |
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.
| The expression argument of an aggregate function can not | |
| contain an aggregate function. | |
| </li> | |
| <li> | |
| Only custom aggregate functions use the `DISTINCT` keyword | |
| The expression argument of an aggregate function cannot | |
| contain an aggregate function. | |
| </li> | |
| <li> | |
| Only custom aggregate functions can use the `DISTINCT` keyword |
This extracts the HTML changes from #272 (First EXISTS scope restriction PR) in the "Variable Scope" and Grammar Notes sections. The PR breaking up long lines in lists and changes most
<code>to`.The PR moves the grammar note about entry points and the note about LL(1) out of the notes list.
Preview | Diff