Skip to content

Conversation

@afs
Copy link
Contributor

@afs afs commented Jan 16, 2026

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

@afs afs requested review from hartig, kasei and rubensworks January 16, 2026 16:35
@afs afs added the Editorial Errata management: this erratum is editorial label Jan 16, 2026
@afs afs requested a review from Tpt January 16, 2026 16:35
@afs afs force-pushed the afs/tidy-markup branch from bb9ce5c to ee9c558 Compare January 16, 2026 16:52
@afs afs marked this pull request as draft January 16, 2026 17:12
@afs afs force-pushed the afs/tidy-markup branch 2 times, most recently from 1538735 to 897284d Compare January 16, 2026 17:16
@afs afs force-pushed the afs/tidy-markup branch from 897284d to 073410a Compare January 16, 2026 17:20
@afs afs marked this pull request as ready for review January 16, 2026 17:32
Copy link
Contributor

@hartig hartig left a 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!

@afs afs merged commit 160ba3f into main Jan 19, 2026
2 checks passed
@afs afs deleted the afs/tidy-markup branch January 19, 2026 15:48
Comment on lines +8972 to +8982
<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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<a href="#rDeleteData">`DELETE DATA`</a>
<a href="#rDeleteData">`DELETE DATA`</a>,

Comment on lines +11265 to +11270
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>
Copy link
Member

@TallTed TallTed Jan 22, 2026

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.

Suggested change
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
Copy link
Member

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.

Suggested change
must correspond to the number of
MUST correspond to the number of

Comment on lines +11286 to +11295
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Comment on lines +11308 to +11312
The expression argument of an aggregate function can not
contain an aggregate function.
</li>
<li>
Only custom aggregate functions use the `DISTINCT` keyword
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Editorial Errata management: this erratum is editorial

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants