@kurrawongai/codemirror-lang-sparql12 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +191 -189
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +191 -189
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/complete.ts +1 -1
- package/src/sparql.grammar +6 -4
package/src/complete.ts
CHANGED
|
@@ -54,7 +54,7 @@ const FUNCTIONS = [
|
|
|
54
54
|
const AGGREGATES = ['COUNT', 'SUM', 'MIN', 'MAX', 'AVG', 'SAMPLE', 'GROUP_CONCAT', 'SEPARATOR'];
|
|
55
55
|
|
|
56
56
|
/** SRL adds these to the SPARQL list; `DATA`, `NOT`, `WHERE` and `FILTER` it already had, and `GROUP BY` too. */
|
|
57
|
-
const SRL_KEYWORDS = ['RULE', 'WHERE', 'DATA', 'NOT', 'FILTER', 'SET', 'GROUP', 'TUPLE'];
|
|
57
|
+
const SRL_KEYWORDS = ['RULE', 'WHERE', 'GROUND', 'DATA', 'NOT', 'FILTER', 'SET', 'GROUP', 'TUPLE'];
|
|
58
58
|
|
|
59
59
|
/** Keywords of opt-in syntax, offered only when that syntax is enabled. */
|
|
60
60
|
const LATERAL_KEYWORDS = ['LATERAL'];
|
package/src/sparql.grammar
CHANGED
|
@@ -333,14 +333,14 @@ BlankNode { BlankNodeLabel | Anon }
|
|
|
333
333
|
|
|
334
334
|
// ------------------------------------------------------------------------ SRL
|
|
335
335
|
//
|
|
336
|
-
// SRL: `RULE iri? HeadTemplate 'WHERE' '
|
|
336
|
+
// SRL: `RULE iri? HeadTemplate 'WHERE' 'GROUND'? BodyPattern`, plus ground
|
|
337
337
|
// `DATA` blocks, plus the rule-tuples extension. There is no `IF`/`THEN` and no
|
|
338
338
|
// `FOR`/`IN` clause: both were removed from the grammar upstream
|
|
339
339
|
// (w3c/data-shapes commits 58fdfc6 and cfbcd3c, 2026-08-24).
|
|
340
340
|
|
|
341
341
|
RuleSet { (BaseDecl | PrefixDecl | VersionDecl | Rule | SrlDataBlock)* }
|
|
342
342
|
|
|
343
|
-
Rule { KwRULE iri? HeadTemplate KwWHERE
|
|
343
|
+
Rule { KwRULE iri? HeadTemplate KwWHERE KwGROUND? BodyPattern }
|
|
344
344
|
|
|
345
345
|
// A dot-separated list rather than `ConstructTriples | TupleTemplate` repeated:
|
|
346
346
|
// ConstructTriples consumes its own dots, so the two together are ambiguous.
|
|
@@ -351,7 +351,9 @@ BodyPattern { "{" srlGroupBody "}" }
|
|
|
351
351
|
srlGroupBody { TriplesBlock? (srlPatternItem "."? TriplesBlock?)* }
|
|
352
352
|
srlPatternItem { Negation | Filter | Assignment | GroupAggregate | TuplePattern }
|
|
353
353
|
|
|
354
|
-
|
|
354
|
+
// `NOT GROUND` and `WHERE GROUND` were `NOT DATA` and `WHERE DATA` before
|
|
355
|
+
// w3c/data-shapes commit 004346d (2026-11-19).
|
|
356
|
+
Negation { KwNOT KwGROUND? BodyPattern }
|
|
355
357
|
Assignment { KwSET "(" Var AssignOp Expression ")" }
|
|
356
358
|
|
|
357
359
|
// `GROUP BY ?s { … } [ ?n := COUNT(*) ]`, from w3c/data-shapes pull request
|
|
@@ -398,7 +400,7 @@ TupleTemplate { KwTUPLE "(" varOrTerm ("," varOrTerm)* ")" }
|
|
|
398
400
|
KwCOUNT, KwSUM, KwMIN, KwMAX, KwAVG, KwSAMPLE, KwGROUP_CONCAT, KwSEPARATOR,
|
|
399
401
|
KwTRIPLE, KwISTRIPLE, KwSUBJECT, KwPREDICATE, KwOBJECT,
|
|
400
402
|
KwLANGDIR, KwHASLANG, KwHASLANGDIR, KwSTRLANGDIR,
|
|
401
|
-
KwRULE, KwSET, KwTUPLE,
|
|
403
|
+
KwRULE, KwSET, KwTUPLE, KwGROUND,
|
|
402
404
|
KwLATERAL[@dialect=lateral]
|
|
403
405
|
}
|
|
404
406
|
|