@traqula/rules-sparql-1-2 0.0.1-alpha.148 → 0.0.1-alpha.9
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/README.md +5 -3
- package/lib/Factory.d.ts +18 -0
- package/lib/Factory.js +73 -0
- package/lib/Factory.js.map +1 -0
- package/lib/grammar.d.ts +90 -57
- package/lib/grammar.js +279 -157
- package/lib/grammar.js.map +1 -1
- package/lib/index.cjs +3943 -2297
- package/lib/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/lexer.d.ts +19 -52
- package/lib/lexer.js +4 -4
- package/lib/lexer.js.map +1 -1
- package/lib/parserUtils.d.ts +8 -0
- package/lib/parserUtils.js +13 -0
- package/lib/parserUtils.js.map +1 -0
- package/lib/sparql12HelperTypes.d.ts +50 -0
- package/lib/sparql12HelperTypes.js +2 -0
- package/lib/sparql12HelperTypes.js.map +1 -0
- package/lib/sparql12Types.d.ts +311 -19
- package/lib/sparql12Types.js.map +1 -1
- package/lib/validator.d.ts +2 -0
- package/lib/validator.js +17 -0
- package/lib/validator.js.map +1 -0
- package/package.json +12 -15
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Traqula Rules SPARQL 1.2 package
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**WARNING:** V2 will come shortly and will have lots of breaking changes.
|
|
4
|
+
|
|
5
|
+
Traqula rules SPARQL 1.2 contains additional rules required for creating a parser for SPARQL 1.2 from the SPARQL 1.1 rules.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
@@ -12,4 +14,4 @@ or
|
|
|
12
14
|
|
|
13
15
|
```bash
|
|
14
16
|
yarn add @traqula/rules-sparql-1-2
|
|
15
|
-
```
|
|
17
|
+
```
|
package/lib/Factory.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SourceLocation, SubTyped } from '@traqula/core';
|
|
2
|
+
import { Factory as Sparql11Factory } from '@traqula/rules-sparql-1-1';
|
|
3
|
+
import type * as T11 from '@traqula/rules-sparql-1-1';
|
|
4
|
+
import type { Annotation, ContextDefinitionVersion, TermBlank, TermIri, TermTriple, TermVariable, TripleCollectionReifiedTriple, TripleNesting } from './sparql12Types';
|
|
5
|
+
export declare class Factory extends Sparql11Factory {
|
|
6
|
+
termTriple(subject: TermTriple['subject'], predicate: TermTriple['predicate'], object: TermTriple['object'], loc: SourceLocation): TermTriple;
|
|
7
|
+
isTermTriple(obj: object): obj is SubTyped<'term', 'triple'>;
|
|
8
|
+
tripleCollectionReifiedTriple(loc: SourceLocation, subject: TripleNesting['subject'], predicate: TripleNesting['predicate'], object: TripleNesting['object'], reifier?: TripleCollectionReifiedTriple['identifier']): TripleCollectionReifiedTriple;
|
|
9
|
+
isTripleCollectionReifiedTriple(obj: object): obj is SubTyped<'tripleCollection', 'reifiedTriple'>;
|
|
10
|
+
tripleCollectionBlankNodeProperties(identifier: TermBlank | TermVariable | TermIri, triples: TripleNesting[], loc: SourceLocation): T11.TripleCollectionBlankNodeProperties;
|
|
11
|
+
/**
|
|
12
|
+
* Overwritten triple constructor to always contain an empty annotations list
|
|
13
|
+
*/
|
|
14
|
+
triple: Sparql11Factory['triple'];
|
|
15
|
+
annotatedTriple(subject: TripleNesting['subject'], predicate: TripleNesting['predicate'], object: TripleNesting['object'], annotations?: Annotation[], loc?: SourceLocation): TripleNesting;
|
|
16
|
+
contextDefinitionVersion(version: string, loc: SourceLocation): ContextDefinitionVersion;
|
|
17
|
+
isContextDefinitionVersion(obj: object): obj is SubTyped<'contextDef', 'version'>;
|
|
18
|
+
}
|
package/lib/Factory.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Factory as Sparql11Factory } from '@traqula/rules-sparql-1-1';
|
|
2
|
+
export class Factory extends Sparql11Factory {
|
|
3
|
+
constructor() {
|
|
4
|
+
super(...arguments);
|
|
5
|
+
/**
|
|
6
|
+
* Overwritten triple constructor to always contain an empty annotations list
|
|
7
|
+
*/
|
|
8
|
+
this.triple = (subject, predicate, object, loc) => ({
|
|
9
|
+
type: 'triple',
|
|
10
|
+
subject,
|
|
11
|
+
predicate,
|
|
12
|
+
object,
|
|
13
|
+
annotations: [],
|
|
14
|
+
loc: loc ?? this.sourceLocation(subject, predicate, object),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
termTriple(subject, predicate, object, loc) {
|
|
18
|
+
return {
|
|
19
|
+
type: 'term',
|
|
20
|
+
subType: 'triple',
|
|
21
|
+
subject,
|
|
22
|
+
predicate,
|
|
23
|
+
object,
|
|
24
|
+
loc,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
isTermTriple(obj) {
|
|
28
|
+
return this.isOfSubType(obj, 'term', 'triple');
|
|
29
|
+
}
|
|
30
|
+
tripleCollectionReifiedTriple(loc, subject, predicate, object, reifier) {
|
|
31
|
+
return {
|
|
32
|
+
type: 'tripleCollection',
|
|
33
|
+
subType: 'reifiedTriple',
|
|
34
|
+
triples: [this.triple(subject, predicate, object)],
|
|
35
|
+
identifier: reifier ?? this.blankNode(undefined, this.sourceLocationNoMaterialize()),
|
|
36
|
+
loc,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
isTripleCollectionReifiedTriple(obj) {
|
|
40
|
+
return this.isOfSubType(obj, 'tripleCollection', 'reifiedTriple');
|
|
41
|
+
}
|
|
42
|
+
tripleCollectionBlankNodeProperties(identifier, triples, loc) {
|
|
43
|
+
return {
|
|
44
|
+
type: 'tripleCollection',
|
|
45
|
+
subType: 'blankNodeProperties',
|
|
46
|
+
triples,
|
|
47
|
+
identifier,
|
|
48
|
+
loc,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
annotatedTriple(subject, predicate, object, annotations, loc) {
|
|
52
|
+
return {
|
|
53
|
+
type: 'triple',
|
|
54
|
+
subject,
|
|
55
|
+
predicate,
|
|
56
|
+
object,
|
|
57
|
+
annotations: annotations ?? [],
|
|
58
|
+
loc: loc ?? this.sourceLocation(subject, predicate, object, ...annotations ?? []),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
contextDefinitionVersion(version, loc) {
|
|
62
|
+
return {
|
|
63
|
+
type: 'contextDef',
|
|
64
|
+
subType: 'version',
|
|
65
|
+
version,
|
|
66
|
+
loc,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
isContextDefinitionVersion(obj) {
|
|
70
|
+
return this.isOfSubType(obj, 'contextDef', 'version');
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=Factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Factory.js","sourceRoot":"","sources":["Factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAcvE,MAAM,OAAO,OAAQ,SAAQ,eAAe;IAA5C;;QAuDE;;WAEG;QACa,WAAM,GACpB,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC,CAAoB;YACvD,IAAI,EAAE,QAAQ;YACd,OAAO;YACP,SAAS;YACT,MAAM;YACN,WAAW,EAAE,EAAE;YACf,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC;SACpC,CAAA,CAAC;IA+B9B,CAAC;IAhGQ,UAAU,CACf,OAA8B,EAC9B,SAAkC,EAClC,MAA4B,EAC5B,GAAmB;QAEnB,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,QAAQ;YACjB,OAAO;YACP,SAAS;YACT,MAAM;YACN,GAAG;SACJ,CAAC;IACJ,CAAC;IAEM,YAAY,CAAC,GAAW;QAC7B,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IACjD,CAAC;IAEM,6BAA6B,CAClC,GAAmB,EACnB,OAAiC,EACjC,SAAqC,EACrC,MAA+B,EAC/B,OAAqD;QAErD,OAAO;YACL,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,eAAe;YACxB,OAAO,EAAE,CAAE,IAAI,CAAC,MAAM,CAA+B,OAAO,EAAE,SAAS,EAA+B,MAAM,CAAC,CAAE;YAC/G,UAAU,EAAE,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,CAAC,2BAA2B,EAAE,CAAC;YACpF,GAAG;SACJ,CAAC;IACJ,CAAC;IAEM,+BAA+B,CAAC,GAAW;QAChD,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,kBAAkB,EAAE,eAAe,CAAC,CAAC;IACpE,CAAC;IAEe,mCAAmC,CACjD,UAA8C,EAC9C,OAAwB,EACxB,GAAmB;QAEnB,OAAiD;YAC/C,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,qBAAqB;YAC9B,OAAO;YACP,UAAU;YACV,GAAG;SAC0C,CAAC;IAClD,CAAC;IAeM,eAAe,CACpB,OAAiC,EACjC,SAAqC,EACrC,MAA+B,EAC/B,WAA0B,EAC1B,GAAoB;QAEpB,OAAO;YACL,IAAI,EAAE,QAAQ;YACd,OAAO;YACP,SAAS;YACT,MAAM;YACN,WAAW,EAAE,WAAW,IAAI,EAAE;YAC9B,GAAG,EAAE,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,WAAW,IAAI,EAAE,CAAC;SAClF,CAAC;IACJ,CAAC;IAEM,wBAAwB,CAAC,OAAe,EAAE,GAAmB;QAClE,OAAO;YACL,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,SAAS;YAClB,OAAO;YACP,GAAG;SACJ,CAAC;IACJ,CAAC;IAEM,0BAA0B,CAAC,GAAW;QAC3C,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;IACxD,CAAC;CACF","sourcesContent":["import type { SourceLocation, SubTyped } from '@traqula/core';\nimport { Factory as Sparql11Factory } from '@traqula/rules-sparql-1-1';\nimport type * as T11 from '@traqula/rules-sparql-1-1';\nimport type {\n Annotation,\n ContextDefinitionVersion,\n TermBlank,\n TermIri,\n TermTriple,\n TermVariable,\n TripleCollectionBlankNodeProperties,\n TripleCollectionReifiedTriple,\n TripleNesting,\n} from './sparql12Types';\n\nexport class Factory extends Sparql11Factory {\n public termTriple(\n subject: TermTriple['subject'],\n predicate: TermTriple['predicate'],\n object: TermTriple['object'],\n loc: SourceLocation,\n ): TermTriple {\n return {\n type: 'term',\n subType: 'triple',\n subject,\n predicate,\n object,\n loc,\n };\n }\n\n public isTermTriple(obj: object): obj is SubTyped<'term', 'triple'> {\n return this.isOfSubType(obj, 'term', 'triple');\n }\n\n public tripleCollectionReifiedTriple(\n loc: SourceLocation,\n subject: TripleNesting['subject'],\n predicate: TripleNesting['predicate'],\n object: TripleNesting['object'],\n reifier?: TripleCollectionReifiedTriple['identifier'],\n ): TripleCollectionReifiedTriple {\n return {\n type: 'tripleCollection',\n subType: 'reifiedTriple',\n triples: [ this.triple(<T11.TripleNesting['subject']>subject, predicate, <T11.TripleNesting['object']>object) ],\n identifier: reifier ?? this.blankNode(undefined, this.sourceLocationNoMaterialize()),\n loc,\n };\n }\n\n public isTripleCollectionReifiedTriple(obj: object): obj is SubTyped<'tripleCollection', 'reifiedTriple'> {\n return this.isOfSubType(obj, 'tripleCollection', 'reifiedTriple');\n }\n\n public override tripleCollectionBlankNodeProperties(\n identifier: TermBlank | TermVariable | TermIri,\n triples: TripleNesting[],\n loc: SourceLocation,\n ): T11.TripleCollectionBlankNodeProperties {\n return <T11.TripleCollectionBlankNodeProperties> {\n type: 'tripleCollection',\n subType: 'blankNodeProperties',\n triples,\n identifier,\n loc,\n } satisfies TripleCollectionBlankNodeProperties;\n }\n\n /**\n * Overwritten triple constructor to always contain an empty annotations list\n */\n public override triple: Sparql11Factory['triple'] =\n (subject, predicate, object, loc) => <T11.TripleNesting> {\n type: 'triple',\n subject,\n predicate,\n object,\n annotations: [],\n loc: loc ?? this.sourceLocation(subject, predicate, object),\n } satisfies TripleNesting;\n\n public annotatedTriple(\n subject: TripleNesting['subject'],\n predicate: TripleNesting['predicate'],\n object: TripleNesting['object'],\n annotations?: Annotation[],\n loc?: SourceLocation,\n ): TripleNesting {\n return {\n type: 'triple',\n subject,\n predicate,\n object,\n annotations: annotations ?? [],\n loc: loc ?? this.sourceLocation(subject, predicate, object, ...annotations ?? []),\n };\n }\n\n public contextDefinitionVersion(version: string, loc: SourceLocation): ContextDefinitionVersion {\n return {\n type: 'contextDef',\n subType: 'version',\n version,\n loc,\n };\n }\n\n public isContextDefinitionVersion(obj: object): obj is SubTyped<'contextDef', 'version'> {\n return this.isOfSubType(obj, 'contextDef', 'version');\n }\n}\n"]}
|
package/lib/grammar.d.ts
CHANGED
|
@@ -4,138 +4,161 @@
|
|
|
4
4
|
* Rules in this module redefine the return type of core grammar rules.
|
|
5
5
|
* It is therefore essential that the parser retypes the rules from the core grammar.
|
|
6
6
|
*/
|
|
7
|
-
import type { RuleDefReturn } from '@traqula/core';
|
|
8
|
-
import { SparqlRuleDef } from '@traqula/rules-sparql-1-1';
|
|
7
|
+
import type { RuleDefReturn, Wrap } from '@traqula/core';
|
|
9
8
|
import { gram as S11 } from '@traqula/rules-sparql-1-1';
|
|
10
9
|
import type * as T11 from '@traqula/rules-sparql-1-1';
|
|
11
|
-
import type {
|
|
10
|
+
import type { SparqlGeneratorRule, SparqlGrammarRule, SparqlRule } from './sparql12HelperTypes';
|
|
11
|
+
import type { Annotation, ContextDefinition, ContextDefinitionVersion, Expression, GraphNode, GraphTerm, PatternBgp, Term, TermBlank, TermIri, TermLiteral, TermTriple, TermVariable, TripleCollectionReifiedTriple, TripleNesting } from './sparql12Types';
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
*[[7]](https://www.w3.org/TR/sparql12-query/#rVersionDecl)
|
|
14
14
|
*/
|
|
15
|
-
export declare const
|
|
15
|
+
export declare const versionDecl: SparqlRule<'versionDecl', ContextDefinitionVersion>;
|
|
16
16
|
/**
|
|
17
|
-
* [[
|
|
17
|
+
* [[8]](https://www.w3.org/TR/sparql12-query/#rVersionSpecifier)
|
|
18
18
|
*/
|
|
19
|
-
export declare const
|
|
19
|
+
export declare const versionSpecifier: SparqlGrammarRule<'versionSpecifier', Wrap<string>>;
|
|
20
|
+
/**
|
|
21
|
+
* OVERRIDING RULE {@link S11.prologue}
|
|
22
|
+
* [[8]](https://www.w3.org/TR/sparql12-query/#rVersionSpecifier)
|
|
23
|
+
*/
|
|
24
|
+
export declare const prologue: SparqlRule<'prologue', ContextDefinition[]>;
|
|
25
|
+
/**
|
|
26
|
+
* [[58]](https://www.w3.org/TR/sparql12-query/#rReifiedTripleBlock) Used by triplesSameSubject
|
|
27
|
+
*/
|
|
28
|
+
export declare const reifiedTripleBlock: T11.SparqlGrammarRule<"reifiedTripleBlock", T11.BasicGraphPattern, undefined>;
|
|
29
|
+
/**
|
|
30
|
+
* [[59]](https://www.w3.org/TR/sparql12-query/#rReifiedTripleBlockPath) Used by TriplesSameSubjectPath
|
|
31
|
+
*/
|
|
32
|
+
export declare const reifiedTripleBlockPath: T11.SparqlGrammarRule<"reifiedTripleBlockPath", T11.BasicGraphPattern, undefined>;
|
|
20
33
|
/**
|
|
21
34
|
* OVERRIDING RULE: {@link S11.dataBlockValue}.
|
|
22
|
-
* [[
|
|
35
|
+
* [[69]](https://www.w3.org/TR/sparql12-query/#rDataBlockValue)
|
|
23
36
|
*/
|
|
24
|
-
export declare const dataBlockValue:
|
|
37
|
+
export declare const dataBlockValue: T11.SparqlGrammarRule<'dataBlockValue', RuleDefReturn<typeof S11.dataBlockValue> | TermTriple>;
|
|
25
38
|
/**
|
|
26
|
-
* [[
|
|
39
|
+
* [[70]](https://www.w3.org/TR/sparql12-query/#rReifier)
|
|
27
40
|
*/
|
|
28
|
-
export declare const reifier:
|
|
41
|
+
export declare const reifier: T11.SparqlGrammarRule<'reifier', RuleDefReturn<typeof varOrReifierId>>;
|
|
29
42
|
/**
|
|
30
|
-
* [[
|
|
43
|
+
* [[71]](https://www.w3.org/TR/sparql12-query/#rVarOrReifierId)
|
|
31
44
|
*/
|
|
32
|
-
export declare const varOrReifierId:
|
|
45
|
+
export declare const varOrReifierId: T11.SparqlGrammarRule<'varOrReifierId', TermVariable | TermIri | TermBlank>;
|
|
33
46
|
/**
|
|
34
47
|
* OVERRIDING RULE {@link S11.triplesSameSubject}
|
|
35
|
-
* [[
|
|
48
|
+
* [[81]](https://www.w3.org/TR/sparql12-query/#rTriplesSameSubject)
|
|
36
49
|
*/
|
|
37
|
-
export declare const triplesSameSubject:
|
|
50
|
+
export declare const triplesSameSubject: T11.SparqlGrammarRule<"triplesSameSubject", T11.BasicGraphPattern, undefined>;
|
|
38
51
|
/**
|
|
39
52
|
* OVERRIDING RULE {@link S11.triplesSameSubjectPath}
|
|
40
|
-
* [[
|
|
53
|
+
* [[87]](https://www.w3.org/TR/sparql12-query/#rTriplesSameSubjectPath)
|
|
41
54
|
*/
|
|
42
|
-
export declare const triplesSameSubjectPath:
|
|
55
|
+
export declare const triplesSameSubjectPath: T11.SparqlGrammarRule<"triplesSameSubjectPath", T11.BasicGraphPattern, undefined>;
|
|
43
56
|
/**
|
|
44
57
|
* OVERRIDING RULE: {@link S11.object}.
|
|
45
58
|
* [[84]](https://www.w3.org/TR/sparql12-query/#rObject) Used by ObjectList
|
|
46
59
|
*/
|
|
47
|
-
export declare const object:
|
|
60
|
+
export declare const object: SparqlGrammarRule<"object", TripleNesting, Pick<TripleNesting, "subject" | "predicate">>;
|
|
48
61
|
/**
|
|
49
62
|
* OVERRIDING RULE: {@link S11.objectPath}.
|
|
50
63
|
* [[91]](https://www.w3.org/TR/sparql12-query/#rTriplesSameSubjectPath) Used by ObjectListPath
|
|
51
64
|
*/
|
|
52
|
-
export declare const objectPath:
|
|
65
|
+
export declare const objectPath: SparqlGrammarRule<"objectPath", TripleNesting, Pick<TripleNesting, "subject" | "predicate">>;
|
|
53
66
|
/**
|
|
54
67
|
* [[107]](https://www.w3.org/TR/sparql12-query/#rAnnotationPath)
|
|
55
68
|
*/
|
|
56
|
-
export declare const annotationPath:
|
|
69
|
+
export declare const annotationPath: SparqlRule<"annotationPath", Annotation[]>;
|
|
57
70
|
/**
|
|
58
|
-
* [[
|
|
71
|
+
* [[111]](https://www.w3.org/TR/sparql12-query/#rAnnotation)
|
|
59
72
|
*/
|
|
60
|
-
export declare const annotation:
|
|
73
|
+
export declare const annotation: SparqlRule<"annotation", Annotation[]>;
|
|
61
74
|
/**
|
|
62
|
-
* [[
|
|
75
|
+
* [[110]](https://www.w3.org/TR/sparql12-query/#rAnnotationBlockPath)
|
|
63
76
|
*/
|
|
64
|
-
export declare const annotationBlockPath:
|
|
77
|
+
export declare const annotationBlockPath: SparqlGrammarRule<"annotationBlockPath", import("@traqula/core").Patch<T11.TripleCollectionBlankNodeProperties, {
|
|
78
|
+
triples: TripleNesting[];
|
|
79
|
+
identifier: TermBlank | TermVariable | TermIri;
|
|
80
|
+
}>, T11.TermIri | T11.TermVariable | T11.TermBlank> & SparqlGeneratorRule<"annotationBlockPath", import("@traqula/core").Patch<T11.TripleCollectionBlankNodeProperties, {
|
|
81
|
+
triples: TripleNesting[];
|
|
82
|
+
identifier: TermBlank | TermVariable | TermIri;
|
|
83
|
+
}>>;
|
|
65
84
|
/**
|
|
66
|
-
* [[
|
|
85
|
+
* [[112]](https://www.w3.org/TR/sparql12-query/#rAnnotationBlock)
|
|
67
86
|
*/
|
|
68
|
-
export declare const annotationBlock:
|
|
87
|
+
export declare const annotationBlock: SparqlGrammarRule<"annotationBlock", import("@traqula/core").Patch<T11.TripleCollectionBlankNodeProperties, {
|
|
88
|
+
triples: TripleNesting[];
|
|
89
|
+
identifier: TermBlank | TermVariable | TermIri;
|
|
90
|
+
}>, T11.TermIri | T11.TermVariable | T11.TermBlank> & SparqlGeneratorRule<"annotationBlock", import("@traqula/core").Patch<T11.TripleCollectionBlankNodeProperties, {
|
|
91
|
+
triples: TripleNesting[];
|
|
92
|
+
identifier: TermBlank | TermVariable | TermIri;
|
|
93
|
+
}>>;
|
|
69
94
|
/**
|
|
70
95
|
* OVERRIDING RULE: {@link S11.graphNode}.
|
|
71
96
|
* [[111]](https://www.w3.org/TR/sparql12-query/#rGraphNode)
|
|
72
97
|
*/
|
|
73
|
-
export declare const graphNode:
|
|
98
|
+
export declare const graphNode: SparqlGrammarRule<'graphNode', GraphNode>;
|
|
74
99
|
/**
|
|
75
100
|
* OVERRIDING RULE: {@link S11.graphNodePath}.
|
|
76
|
-
* [[
|
|
101
|
+
* [[114]](https://www.w3.org/TR/sparql12-query/#rGraphNodePath)
|
|
77
102
|
*/
|
|
78
|
-
export declare const graphNodePath:
|
|
103
|
+
export declare const graphNodePath: SparqlRule<'graphNodePath', GraphNode>;
|
|
79
104
|
/**
|
|
80
105
|
* OVERRIDING RULE: {@link S11.varOrTerm}.
|
|
81
|
-
* [[
|
|
106
|
+
* [[115]](https://www.w3.org/TR/sparql12-query/#rVarOrTerm)
|
|
82
107
|
*/
|
|
83
|
-
export declare const varOrTerm:
|
|
108
|
+
export declare const varOrTerm: SparqlGrammarRule<'varOrTerm', Term>;
|
|
84
109
|
/**
|
|
85
110
|
* [[114]](https://www.w3.org/TR/sparql12-query/#rReifiedTriple)
|
|
86
111
|
*/
|
|
87
|
-
export declare const reifiedTriple:
|
|
88
|
-
node: T11.BlankTerm | T11.VariableTerm | T11.IriTerm;
|
|
89
|
-
}>;
|
|
112
|
+
export declare const reifiedTriple: SparqlRule<'reifiedTriple', TripleCollectionReifiedTriple>;
|
|
90
113
|
/**
|
|
91
114
|
* [[115]](https://www.w3.org/TR/sparql12-query/#rReifiedTripleSubject)
|
|
92
115
|
*/
|
|
93
|
-
export declare const reifiedTripleSubject:
|
|
116
|
+
export declare const reifiedTripleSubject: T11.SparqlGrammarRule<'reifiedTripleSubject', Term | TripleCollectionReifiedTriple>;
|
|
94
117
|
/**
|
|
95
118
|
* [[116]](https://www.w3.org/TR/sparql12-query/#rReifiedTripleObject)
|
|
96
119
|
*/
|
|
97
|
-
export declare const reifiedTripleObject:
|
|
120
|
+
export declare const reifiedTripleObject: T11.SparqlGrammarRule<'reifiedTripleObject', RuleDefReturn<typeof reifiedTripleSubject>>;
|
|
98
121
|
/**
|
|
99
122
|
* [[117]](https://www.w3.org/TR/sparql12-query/#rTripleTerm)
|
|
100
123
|
*/
|
|
101
|
-
export declare const tripleTerm:
|
|
124
|
+
export declare const tripleTerm: SparqlRule<'tripleTerm', TermTriple>;
|
|
102
125
|
/**
|
|
103
|
-
* [[
|
|
126
|
+
* [[120]](https://www.w3.org/TR/sparql12-query/#rTripleTermSubject)
|
|
104
127
|
*/
|
|
105
|
-
export declare const tripleTermSubject:
|
|
128
|
+
export declare const tripleTermSubject: T11.SparqlGrammarRule<'tripleTermSubject', TermVariable | TermIri | TermLiteral | TermBlank | TermTriple>;
|
|
106
129
|
/**
|
|
107
|
-
* [[
|
|
130
|
+
* [[121]](https://www.w3.org/TR/sparql12-query/#rTripleTermObject)
|
|
108
131
|
*/
|
|
109
|
-
export declare const tripleTermObject:
|
|
132
|
+
export declare const tripleTermObject: T11.SparqlGrammarRule<'tripleTermObject', RuleDefReturn<typeof tripleTermSubject>>;
|
|
110
133
|
/**
|
|
111
|
-
* [[
|
|
134
|
+
* [[122]](https://www.w3.org/TR/sparql12-query/#rTripleTermData)
|
|
112
135
|
*/
|
|
113
|
-
export declare const tripleTermData:
|
|
136
|
+
export declare const tripleTermData: SparqlGrammarRule<'tripleTermData', TermTriple>;
|
|
114
137
|
/**
|
|
115
|
-
* [[
|
|
138
|
+
* [[123]](https://www.w3.org/TR/sparql12-query/#rTripleTermDataSubject)
|
|
116
139
|
*/
|
|
117
|
-
export declare const tripleTermDataSubject:
|
|
140
|
+
export declare const tripleTermDataSubject: T11.SparqlGrammarRule<'tripleTermDataSubject', TermIri | TermLiteral | TermTriple>;
|
|
118
141
|
/**
|
|
119
|
-
* [[
|
|
142
|
+
* [[124]](https://www.w3.org/TR/sparql12-query/#rTripleTermDataObject)
|
|
120
143
|
*/
|
|
121
|
-
export declare const tripleTermDataObject:
|
|
144
|
+
export declare const tripleTermDataObject: T11.SparqlGrammarRule<'tripleTermDataObject', RuleDefReturn<typeof tripleTermDataSubject>>;
|
|
122
145
|
/**
|
|
123
146
|
* OVERRIDING RULE: {@link S11.primaryExpression}.
|
|
124
|
-
* [[
|
|
147
|
+
* [[136]](https://www.w3.org/TR/sparql12-query/#rPrimaryExpression)
|
|
125
148
|
*/
|
|
126
|
-
export declare const primaryExpression:
|
|
149
|
+
export declare const primaryExpression: T11.SparqlGrammarRule<'primaryExpression', Expression>;
|
|
127
150
|
/**
|
|
128
151
|
* [[135]](https://www.w3.org/TR/sparql12-query/#rExprTripleTerm)
|
|
129
152
|
*/
|
|
130
|
-
export declare const exprTripleTerm:
|
|
153
|
+
export declare const exprTripleTerm: SparqlGrammarRule<'exprTripleTerm', TermTriple>;
|
|
131
154
|
/**
|
|
132
|
-
* [[
|
|
155
|
+
* [[138]](https://www.w3.org/TR/sparql12-query/#rExprTripleTermSubject)
|
|
133
156
|
*/
|
|
134
|
-
export declare const exprTripleTermSubject:
|
|
157
|
+
export declare const exprTripleTermSubject: T11.SparqlGrammarRule<'exprTripleTermSubject', TermIri | TermVariable | TermLiteral | TermTriple>;
|
|
135
158
|
/**
|
|
136
|
-
* [[
|
|
159
|
+
* [[139]](https://www.w3.org/TR/sparql12-query/#rExprTripleTermObject)
|
|
137
160
|
*/
|
|
138
|
-
export declare const exprTripleTermObject:
|
|
161
|
+
export declare const exprTripleTermObject: T11.SparqlGrammarRule<'exprTripleTermObject', RuleDefReturn<typeof exprTripleTermSubject> | TermTriple>;
|
|
139
162
|
export declare const builtinLangDir: S11.RuleDefExpressionFunctionX<"builtInLangdir", [T11.Expression]>;
|
|
140
163
|
export declare const builtinLangStrDir: S11.RuleDefExpressionFunctionX<"builtInStrLangdir", [T11.Expression, T11.Expression, T11.Expression]>;
|
|
141
164
|
export declare const builtinHasLang: S11.RuleDefExpressionFunctionX<"builtInHasLang", [T11.Expression]>;
|
|
@@ -147,12 +170,22 @@ export declare const builtinPredicate: S11.RuleDefExpressionFunctionX<"builtInPr
|
|
|
147
170
|
export declare const builtinObject: S11.RuleDefExpressionFunctionX<"builtInObject", [T11.Expression]>;
|
|
148
171
|
/**
|
|
149
172
|
* OVERRIDING RULE: {@link S11.builtInCall}.
|
|
150
|
-
* [[
|
|
173
|
+
* [[141]](https://www.w3.org/TR/sparql12-query/#rBuiltInCall)
|
|
151
174
|
*/
|
|
152
175
|
export declare const builtInCall: typeof S11.builtInCall;
|
|
153
176
|
/**
|
|
154
177
|
* OVERRIDING RULE: {@link S11.rdfLiteral}.
|
|
155
178
|
* No retyping is needed since the return type is the same
|
|
156
|
-
* [[
|
|
179
|
+
* [[149]](https://www.w3.org/TR/sparql12-query/#rRDFLiteral)
|
|
180
|
+
*/
|
|
181
|
+
export declare const rdfLiteral: SparqlGrammarRule<'rdfLiteral', RuleDefReturn<typeof S11.rdfLiteral>>;
|
|
182
|
+
/**
|
|
183
|
+
* OVERRIDING RULE: {@link S11.triplesBlock}.
|
|
184
|
+
*/
|
|
185
|
+
export declare const generateTriplesBlock: SparqlGeneratorRule<'triplesBlock', PatternBgp>;
|
|
186
|
+
/**
|
|
187
|
+
* OVERRIDING RULE: {@link S11.graphTerm}.
|
|
188
|
+
* No retyping is needed since the return type is the same
|
|
189
|
+
* [[149]](https://www.w3.org/TR/sparql12-query/#rRDFLiteral)
|
|
157
190
|
*/
|
|
158
|
-
export declare const
|
|
191
|
+
export declare const generateGraphTerm: SparqlGeneratorRule<'graphTerm', GraphTerm>;
|