@traqula/rules-sparql-1-2 0.0.1-alpha.10
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/LICENSE.txt +22 -0
- package/README.md +17 -0
- 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 +191 -0
- package/lib/grammar.js +611 -0
- package/lib/grammar.js.map +1 -0
- package/lib/index.cjs +15203 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -0
- package/lib/lexer.d.ts +20 -0
- package/lib/lexer.js +40 -0
- package/lib/lexer.js.map +1 -0
- 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 +317 -0
- package/lib/sparql12Types.js +2 -0
- package/lib/sparql12Types.js.map +1 -0
- package/lib/validator.d.ts +2 -0
- package/lib/validator.js +17 -0
- package/lib/validator.js.map +1 -0
- package/package.json +45 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2024–now Jitse De Smet
|
|
4
|
+
Comunica Association and Ghent University – imec, Belgium
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Traqula Rules SPARQL 1.2 package
|
|
2
|
+
|
|
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.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @traqula/rules-sparql-1-2
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
or
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yarn add @traqula/rules-sparql-1-2
|
|
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
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module will define patch rules that should be used in combination with the sparql11 grammar to create
|
|
3
|
+
* a sparql12 grammar.
|
|
4
|
+
* Rules in this module redefine the return type of core grammar rules.
|
|
5
|
+
* It is therefore essential that the parser retypes the rules from the core grammar.
|
|
6
|
+
*/
|
|
7
|
+
import type { RuleDefReturn, Wrap } from '@traqula/core';
|
|
8
|
+
import { gram as S11 } from '@traqula/rules-sparql-1-1';
|
|
9
|
+
import type * as T11 from '@traqula/rules-sparql-1-1';
|
|
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
|
+
/**
|
|
13
|
+
*[[7]](https://www.w3.org/TR/sparql12-query/#rVersionDecl)
|
|
14
|
+
*/
|
|
15
|
+
export declare const versionDecl: SparqlRule<'versionDecl', ContextDefinitionVersion>;
|
|
16
|
+
/**
|
|
17
|
+
* [[8]](https://www.w3.org/TR/sparql12-query/#rVersionSpecifier)
|
|
18
|
+
*/
|
|
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>;
|
|
33
|
+
/**
|
|
34
|
+
* OVERRIDING RULE: {@link S11.dataBlockValue}.
|
|
35
|
+
* [[69]](https://www.w3.org/TR/sparql12-query/#rDataBlockValue)
|
|
36
|
+
*/
|
|
37
|
+
export declare const dataBlockValue: T11.SparqlGrammarRule<'dataBlockValue', RuleDefReturn<typeof S11.dataBlockValue> | TermTriple>;
|
|
38
|
+
/**
|
|
39
|
+
* [[70]](https://www.w3.org/TR/sparql12-query/#rReifier)
|
|
40
|
+
*/
|
|
41
|
+
export declare const reifier: T11.SparqlGrammarRule<'reifier', RuleDefReturn<typeof varOrReifierId>>;
|
|
42
|
+
/**
|
|
43
|
+
* [[71]](https://www.w3.org/TR/sparql12-query/#rVarOrReifierId)
|
|
44
|
+
*/
|
|
45
|
+
export declare const varOrReifierId: T11.SparqlGrammarRule<'varOrReifierId', TermVariable | TermIri | TermBlank>;
|
|
46
|
+
/**
|
|
47
|
+
* OVERRIDING RULE {@link S11.triplesSameSubject}
|
|
48
|
+
* [[81]](https://www.w3.org/TR/sparql12-query/#rTriplesSameSubject)
|
|
49
|
+
*/
|
|
50
|
+
export declare const triplesSameSubject: T11.SparqlGrammarRule<"triplesSameSubject", T11.BasicGraphPattern, undefined>;
|
|
51
|
+
/**
|
|
52
|
+
* OVERRIDING RULE {@link S11.triplesSameSubjectPath}
|
|
53
|
+
* [[87]](https://www.w3.org/TR/sparql12-query/#rTriplesSameSubjectPath)
|
|
54
|
+
*/
|
|
55
|
+
export declare const triplesSameSubjectPath: T11.SparqlGrammarRule<"triplesSameSubjectPath", T11.BasicGraphPattern, undefined>;
|
|
56
|
+
/**
|
|
57
|
+
* OVERRIDING RULE: {@link S11.object}.
|
|
58
|
+
* [[84]](https://www.w3.org/TR/sparql12-query/#rObject) Used by ObjectList
|
|
59
|
+
*/
|
|
60
|
+
export declare const object: SparqlGrammarRule<"object", TripleNesting, Pick<TripleNesting, "subject" | "predicate">>;
|
|
61
|
+
/**
|
|
62
|
+
* OVERRIDING RULE: {@link S11.objectPath}.
|
|
63
|
+
* [[91]](https://www.w3.org/TR/sparql12-query/#rTriplesSameSubjectPath) Used by ObjectListPath
|
|
64
|
+
*/
|
|
65
|
+
export declare const objectPath: SparqlGrammarRule<"objectPath", TripleNesting, Pick<TripleNesting, "subject" | "predicate">>;
|
|
66
|
+
/**
|
|
67
|
+
* [[107]](https://www.w3.org/TR/sparql12-query/#rAnnotationPath)
|
|
68
|
+
*/
|
|
69
|
+
export declare const annotationPath: SparqlRule<"annotationPath", Annotation[]>;
|
|
70
|
+
/**
|
|
71
|
+
* [[111]](https://www.w3.org/TR/sparql12-query/#rAnnotation)
|
|
72
|
+
*/
|
|
73
|
+
export declare const annotation: SparqlRule<"annotation", Annotation[]>;
|
|
74
|
+
/**
|
|
75
|
+
* [[110]](https://www.w3.org/TR/sparql12-query/#rAnnotationBlockPath)
|
|
76
|
+
*/
|
|
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
|
+
}>>;
|
|
84
|
+
/**
|
|
85
|
+
* [[112]](https://www.w3.org/TR/sparql12-query/#rAnnotationBlock)
|
|
86
|
+
*/
|
|
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
|
+
}>>;
|
|
94
|
+
/**
|
|
95
|
+
* OVERRIDING RULE: {@link S11.graphNode}.
|
|
96
|
+
* [[111]](https://www.w3.org/TR/sparql12-query/#rGraphNode)
|
|
97
|
+
*/
|
|
98
|
+
export declare const graphNode: SparqlGrammarRule<'graphNode', GraphNode>;
|
|
99
|
+
/**
|
|
100
|
+
* OVERRIDING RULE: {@link S11.graphNodePath}.
|
|
101
|
+
* [[114]](https://www.w3.org/TR/sparql12-query/#rGraphNodePath)
|
|
102
|
+
*/
|
|
103
|
+
export declare const graphNodePath: SparqlRule<'graphNodePath', GraphNode>;
|
|
104
|
+
/**
|
|
105
|
+
* OVERRIDING RULE: {@link S11.varOrTerm}.
|
|
106
|
+
* [[115]](https://www.w3.org/TR/sparql12-query/#rVarOrTerm)
|
|
107
|
+
*/
|
|
108
|
+
export declare const varOrTerm: SparqlGrammarRule<'varOrTerm', Term>;
|
|
109
|
+
/**
|
|
110
|
+
* [[114]](https://www.w3.org/TR/sparql12-query/#rReifiedTriple)
|
|
111
|
+
*/
|
|
112
|
+
export declare const reifiedTriple: SparqlRule<'reifiedTriple', TripleCollectionReifiedTriple>;
|
|
113
|
+
/**
|
|
114
|
+
* [[115]](https://www.w3.org/TR/sparql12-query/#rReifiedTripleSubject)
|
|
115
|
+
*/
|
|
116
|
+
export declare const reifiedTripleSubject: T11.SparqlGrammarRule<'reifiedTripleSubject', Term | TripleCollectionReifiedTriple>;
|
|
117
|
+
/**
|
|
118
|
+
* [[116]](https://www.w3.org/TR/sparql12-query/#rReifiedTripleObject)
|
|
119
|
+
*/
|
|
120
|
+
export declare const reifiedTripleObject: T11.SparqlGrammarRule<'reifiedTripleObject', RuleDefReturn<typeof reifiedTripleSubject>>;
|
|
121
|
+
/**
|
|
122
|
+
* [[117]](https://www.w3.org/TR/sparql12-query/#rTripleTerm)
|
|
123
|
+
*/
|
|
124
|
+
export declare const tripleTerm: SparqlRule<'tripleTerm', TermTriple>;
|
|
125
|
+
/**
|
|
126
|
+
* [[120]](https://www.w3.org/TR/sparql12-query/#rTripleTermSubject)
|
|
127
|
+
*/
|
|
128
|
+
export declare const tripleTermSubject: T11.SparqlGrammarRule<'tripleTermSubject', TermVariable | TermIri | TermLiteral | TermBlank | TermTriple>;
|
|
129
|
+
/**
|
|
130
|
+
* [[121]](https://www.w3.org/TR/sparql12-query/#rTripleTermObject)
|
|
131
|
+
*/
|
|
132
|
+
export declare const tripleTermObject: T11.SparqlGrammarRule<'tripleTermObject', RuleDefReturn<typeof tripleTermSubject>>;
|
|
133
|
+
/**
|
|
134
|
+
* [[122]](https://www.w3.org/TR/sparql12-query/#rTripleTermData)
|
|
135
|
+
*/
|
|
136
|
+
export declare const tripleTermData: SparqlGrammarRule<'tripleTermData', TermTriple>;
|
|
137
|
+
/**
|
|
138
|
+
* [[123]](https://www.w3.org/TR/sparql12-query/#rTripleTermDataSubject)
|
|
139
|
+
*/
|
|
140
|
+
export declare const tripleTermDataSubject: T11.SparqlGrammarRule<'tripleTermDataSubject', TermIri | TermLiteral | TermTriple>;
|
|
141
|
+
/**
|
|
142
|
+
* [[124]](https://www.w3.org/TR/sparql12-query/#rTripleTermDataObject)
|
|
143
|
+
*/
|
|
144
|
+
export declare const tripleTermDataObject: T11.SparqlGrammarRule<'tripleTermDataObject', RuleDefReturn<typeof tripleTermDataSubject>>;
|
|
145
|
+
/**
|
|
146
|
+
* OVERRIDING RULE: {@link S11.primaryExpression}.
|
|
147
|
+
* [[136]](https://www.w3.org/TR/sparql12-query/#rPrimaryExpression)
|
|
148
|
+
*/
|
|
149
|
+
export declare const primaryExpression: T11.SparqlGrammarRule<'primaryExpression', Expression>;
|
|
150
|
+
/**
|
|
151
|
+
* [[135]](https://www.w3.org/TR/sparql12-query/#rExprTripleTerm)
|
|
152
|
+
*/
|
|
153
|
+
export declare const exprTripleTerm: SparqlGrammarRule<'exprTripleTerm', TermTriple>;
|
|
154
|
+
/**
|
|
155
|
+
* [[138]](https://www.w3.org/TR/sparql12-query/#rExprTripleTermSubject)
|
|
156
|
+
*/
|
|
157
|
+
export declare const exprTripleTermSubject: T11.SparqlGrammarRule<'exprTripleTermSubject', TermIri | TermVariable | TermLiteral | TermTriple>;
|
|
158
|
+
/**
|
|
159
|
+
* [[139]](https://www.w3.org/TR/sparql12-query/#rExprTripleTermObject)
|
|
160
|
+
*/
|
|
161
|
+
export declare const exprTripleTermObject: T11.SparqlGrammarRule<'exprTripleTermObject', RuleDefReturn<typeof exprTripleTermSubject> | TermTriple>;
|
|
162
|
+
export declare const builtinLangDir: S11.RuleDefExpressionFunctionX<"builtInLangdir", [T11.Expression]>;
|
|
163
|
+
export declare const builtinLangStrDir: S11.RuleDefExpressionFunctionX<"builtInStrLangdir", [T11.Expression, T11.Expression, T11.Expression]>;
|
|
164
|
+
export declare const builtinHasLang: S11.RuleDefExpressionFunctionX<"builtInHasLang", [T11.Expression]>;
|
|
165
|
+
export declare const builtinHasLangDir: S11.RuleDefExpressionFunctionX<"builtInHasLangdir", [T11.Expression]>;
|
|
166
|
+
export declare const builtinIsTriple: S11.RuleDefExpressionFunctionX<"builtInIsTriple", [T11.Expression]>;
|
|
167
|
+
export declare const builtinTriple: S11.RuleDefExpressionFunctionX<"builtInTriple", [T11.Expression, T11.Expression, T11.Expression]>;
|
|
168
|
+
export declare const builtinSubject: S11.RuleDefExpressionFunctionX<"builtInSubject", [T11.Expression]>;
|
|
169
|
+
export declare const builtinPredicate: S11.RuleDefExpressionFunctionX<"builtInPredicate", [T11.Expression]>;
|
|
170
|
+
export declare const builtinObject: S11.RuleDefExpressionFunctionX<"builtInObject", [T11.Expression]>;
|
|
171
|
+
/**
|
|
172
|
+
* OVERRIDING RULE: {@link S11.builtInCall}.
|
|
173
|
+
* [[141]](https://www.w3.org/TR/sparql12-query/#rBuiltInCall)
|
|
174
|
+
*/
|
|
175
|
+
export declare const builtInCall: typeof S11.builtInCall;
|
|
176
|
+
/**
|
|
177
|
+
* OVERRIDING RULE: {@link S11.rdfLiteral}.
|
|
178
|
+
* No retyping is needed since the return type is the same
|
|
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)
|
|
190
|
+
*/
|
|
191
|
+
export declare const generateGraphTerm: SparqlGeneratorRule<'graphTerm', GraphTerm>;
|