@traqula/rules-sparql-1-2 0.0.1-alpha.143 → 0.0.1-alpha.148
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/lib/grammar.d.ts +32 -31
- package/lib/grammar.js +134 -130
- package/lib/grammar.js.map +1 -1
- package/lib/index.cjs +1253 -1258
- package/lib/lexer.d.ts +1 -1
- package/lib/sparql12Types.d.ts +0 -8
- package/lib/sparql12Types.js.map +1 -1
- package/package.json +4 -4
package/lib/grammar.d.ts
CHANGED
|
@@ -4,137 +4,138 @@
|
|
|
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
|
|
7
|
+
import type { RuleDefReturn } from '@traqula/core';
|
|
8
|
+
import { SparqlRuleDef } from '@traqula/rules-sparql-1-1';
|
|
8
9
|
import { gram as S11 } from '@traqula/rules-sparql-1-1';
|
|
9
10
|
import type * as T11 from '@traqula/rules-sparql-1-1';
|
|
10
|
-
import type { BaseQuadTerm, Expression, IGraphNode, Term, Triple
|
|
11
|
+
import type { BaseQuadTerm, Expression, IGraphNode, Term, Triple } from './sparql12Types';
|
|
11
12
|
/**
|
|
12
13
|
* [[56]](https://www.w3.org/TR/sparql12-query/#rReifiedTripleBlock) Used by triplesSameSubject
|
|
13
14
|
*/
|
|
14
|
-
export declare const reifiedTripleBlock:
|
|
15
|
+
export declare const reifiedTripleBlock: SparqlRuleDef<"reifiedTripleBlock", Triple[]>;
|
|
15
16
|
/**
|
|
16
17
|
* [[57]](https://www.w3.org/TR/sparql12-query/#rReifiedTripleBlockPath) Used by TriplesSameSubjectPath
|
|
17
18
|
*/
|
|
18
|
-
export declare const reifiedTripleBlockPath:
|
|
19
|
+
export declare const reifiedTripleBlockPath: SparqlRuleDef<"reifiedTripleBlockPath", Triple[]>;
|
|
19
20
|
/**
|
|
20
21
|
* OVERRIDING RULE: {@link S11.dataBlockValue}.
|
|
21
22
|
* [[67]](https://www.w3.org/TR/sparql12-query/#rDataBlockValue)
|
|
22
23
|
*/
|
|
23
|
-
export declare const dataBlockValue:
|
|
24
|
+
export declare const dataBlockValue: SparqlRuleDef<'dataBlockValue', RuleDefReturn<typeof S11.dataBlockValue> | BaseQuadTerm>;
|
|
24
25
|
/**
|
|
25
26
|
* [[68]](https://www.w3.org/TR/sparql12-query/#rReifier)
|
|
26
27
|
*/
|
|
27
|
-
export declare const reifier:
|
|
28
|
+
export declare const reifier: SparqlRuleDef<'reifier', T11.VariableTerm | T11.IriTerm | T11.BlankTerm>;
|
|
28
29
|
/**
|
|
29
30
|
* [[68]](https://www.w3.org/TR/sparql12-query/#rVarOrReifierId)
|
|
30
31
|
*/
|
|
31
|
-
export declare const varOrReifierId:
|
|
32
|
+
export declare const varOrReifierId: SparqlRuleDef<'varOrReifierId', T11.VariableTerm | T11.IriTerm | T11.BlankTerm>;
|
|
32
33
|
/**
|
|
33
34
|
* OVERRIDING RULE {@link S11.triplesSameSubject}
|
|
34
35
|
* [[79]](https://www.w3.org/TR/sparql12-query/#rTriplesSameSubject)
|
|
35
36
|
*/
|
|
36
|
-
export declare const triplesSameSubject:
|
|
37
|
+
export declare const triplesSameSubject: SparqlRuleDef<"triplesSameSubject", Triple[]>;
|
|
37
38
|
/**
|
|
38
39
|
* OVERRIDING RULE {@link S11.triplesSameSubjectPath}
|
|
39
40
|
* [[85]](https://www.w3.org/TR/sparql12-query/#rTriplesSameSubjectPath)
|
|
40
41
|
*/
|
|
41
|
-
export declare const triplesSameSubjectPath:
|
|
42
|
+
export declare const triplesSameSubjectPath: SparqlRuleDef<"triplesSameSubjectPath", Triple[]>;
|
|
42
43
|
/**
|
|
43
44
|
* OVERRIDING RULE: {@link S11.object}.
|
|
44
45
|
* [[84]](https://www.w3.org/TR/sparql12-query/#rObject) Used by ObjectList
|
|
45
46
|
*/
|
|
46
|
-
export declare const object:
|
|
47
|
+
export declare const object: SparqlRuleDef<"object", Triple[], Pick<Triple, "subject" | "predicate">>;
|
|
47
48
|
/**
|
|
48
49
|
* OVERRIDING RULE: {@link S11.objectPath}.
|
|
49
50
|
* [[91]](https://www.w3.org/TR/sparql12-query/#rTriplesSameSubjectPath) Used by ObjectListPath
|
|
50
51
|
*/
|
|
51
|
-
export declare const objectPath:
|
|
52
|
+
export declare const objectPath: SparqlRuleDef<"objectPath", Triple[], Pick<Triple, "subject" | "predicate">>;
|
|
52
53
|
/**
|
|
53
54
|
* [[107]](https://www.w3.org/TR/sparql12-query/#rAnnotationPath)
|
|
54
55
|
*/
|
|
55
|
-
export declare const annotationPath:
|
|
56
|
+
export declare const annotationPath: SparqlRuleDef<"annotationPath", IGraphNode[]>;
|
|
56
57
|
/**
|
|
57
58
|
* [[109]](https://www.w3.org/TR/sparql12-query/#rAnnotation)
|
|
58
59
|
*/
|
|
59
|
-
export declare const annotation:
|
|
60
|
+
export declare const annotation: SparqlRuleDef<"annotation", IGraphNode[]>;
|
|
60
61
|
/**
|
|
61
62
|
* [[108]](https://www.w3.org/TR/sparql12-query/#rAnnotationBlockPath)
|
|
62
63
|
*/
|
|
63
|
-
export declare const annotationBlockPath:
|
|
64
|
+
export declare const annotationBlockPath: SparqlRuleDef<"annotationBlockPath", Triple[], Pick<Triple, "subject">>;
|
|
64
65
|
/**
|
|
65
66
|
* [[110]](https://www.w3.org/TR/sparql12-query/#rAnnotationBlock)
|
|
66
67
|
*/
|
|
67
|
-
export declare const annotationBlock:
|
|
68
|
+
export declare const annotationBlock: SparqlRuleDef<"annotationBlock", Triple[], Pick<Triple, "subject">>;
|
|
68
69
|
/**
|
|
69
70
|
* OVERRIDING RULE: {@link S11.graphNode}.
|
|
70
71
|
* [[111]](https://www.w3.org/TR/sparql12-query/#rGraphNode)
|
|
71
72
|
*/
|
|
72
|
-
export declare const graphNode:
|
|
73
|
+
export declare const graphNode: SparqlRuleDef<'graphNode', IGraphNode>;
|
|
73
74
|
/**
|
|
74
75
|
* OVERRIDING RULE: {@link S11.graphNodePath}.
|
|
75
76
|
* [[112]](https://www.w3.org/TR/sparql12-query/#rGraphNodePath)
|
|
76
77
|
*/
|
|
77
|
-
export declare const graphNodePath:
|
|
78
|
+
export declare const graphNodePath: SparqlRuleDef<'graphNodePath', IGraphNode>;
|
|
78
79
|
/**
|
|
79
80
|
* OVERRIDING RULE: {@link S11.varOrTerm}.
|
|
80
81
|
* [[113]](https://www.w3.org/TR/sparql12-query/#rVarOrTerm)
|
|
81
82
|
*/
|
|
82
|
-
export declare const varOrTerm:
|
|
83
|
+
export declare const varOrTerm: SparqlRuleDef<'varOrTerm', Term>;
|
|
83
84
|
/**
|
|
84
85
|
* [[114]](https://www.w3.org/TR/sparql12-query/#rReifiedTriple)
|
|
85
86
|
*/
|
|
86
|
-
export declare const reifiedTriple:
|
|
87
|
+
export declare const reifiedTriple: SparqlRuleDef<'reifiedTriple', IGraphNode & {
|
|
87
88
|
node: T11.BlankTerm | T11.VariableTerm | T11.IriTerm;
|
|
88
89
|
}>;
|
|
89
90
|
/**
|
|
90
91
|
* [[115]](https://www.w3.org/TR/sparql12-query/#rReifiedTripleSubject)
|
|
91
92
|
*/
|
|
92
|
-
export declare const reifiedTripleSubject:
|
|
93
|
+
export declare const reifiedTripleSubject: SparqlRuleDef<'reifiedTripleSubject', IGraphNode>;
|
|
93
94
|
/**
|
|
94
95
|
* [[116]](https://www.w3.org/TR/sparql12-query/#rReifiedTripleObject)
|
|
95
96
|
*/
|
|
96
|
-
export declare const reifiedTripleObject:
|
|
97
|
+
export declare const reifiedTripleObject: SparqlRuleDef<'reifiedTripleObject', RuleDefReturn<typeof reifiedTripleSubject>>;
|
|
97
98
|
/**
|
|
98
99
|
* [[117]](https://www.w3.org/TR/sparql12-query/#rTripleTerm)
|
|
99
100
|
*/
|
|
100
|
-
export declare const tripleTerm:
|
|
101
|
+
export declare const tripleTerm: SparqlRuleDef<'tripleTerm', BaseQuadTerm>;
|
|
101
102
|
/**
|
|
102
103
|
* [[118]](https://www.w3.org/TR/sparql12-query/#rTripleTermSubject)
|
|
103
104
|
*/
|
|
104
|
-
export declare const tripleTermSubject:
|
|
105
|
+
export declare const tripleTermSubject: SparqlRuleDef<'tripleTermSubject', T11.VariableTerm | T11.IriTerm | T11.LiteralTerm | T11.BlankTerm>;
|
|
105
106
|
/**
|
|
106
107
|
* [[119]](https://www.w3.org/TR/sparql12-query/#rTripleTermObject)
|
|
107
108
|
*/
|
|
108
|
-
export declare const tripleTermObject:
|
|
109
|
+
export declare const tripleTermObject: SparqlRuleDef<'tripleTermObject', RuleDefReturn<typeof tripleTermSubject> | BaseQuadTerm>;
|
|
109
110
|
/**
|
|
110
111
|
* [[120]](https://www.w3.org/TR/sparql12-query/#rTripleTermData)
|
|
111
112
|
*/
|
|
112
|
-
export declare const tripleTermData:
|
|
113
|
+
export declare const tripleTermData: SparqlRuleDef<'tripleTermData', BaseQuadTerm>;
|
|
113
114
|
/**
|
|
114
115
|
* [[121]](https://www.w3.org/TR/sparql12-query/#rTripleTermDataSubject)
|
|
115
116
|
*/
|
|
116
|
-
export declare const tripleTermDataSubject:
|
|
117
|
+
export declare const tripleTermDataSubject: SparqlRuleDef<'tripleTermDataSubject', T11.IriTerm | T11.LiteralTerm>;
|
|
117
118
|
/**
|
|
118
119
|
* [[122]](https://www.w3.org/TR/sparql12-query/#rTripleTermDataObject)
|
|
119
120
|
*/
|
|
120
|
-
export declare const tripleTermDataObject:
|
|
121
|
+
export declare const tripleTermDataObject: SparqlRuleDef<'tripleTermDataObject', RuleDefReturn<typeof tripleTermDataSubject> | BaseQuadTerm>;
|
|
121
122
|
/**
|
|
122
123
|
* OVERRIDING RULE: {@link S11.primaryExpression}.
|
|
123
124
|
* [[134]](https://www.w3.org/TR/sparql12-query/#rPrimaryExpression)
|
|
124
125
|
*/
|
|
125
|
-
export declare const primaryExpression:
|
|
126
|
+
export declare const primaryExpression: SparqlRuleDef<'primaryExpression', Expression>;
|
|
126
127
|
/**
|
|
127
128
|
* [[135]](https://www.w3.org/TR/sparql12-query/#rExprTripleTerm)
|
|
128
129
|
*/
|
|
129
|
-
export declare const exprTripleTerm:
|
|
130
|
+
export declare const exprTripleTerm: SparqlRuleDef<'exprTripleTerm', BaseQuadTerm>;
|
|
130
131
|
/**
|
|
131
132
|
* [[136]](https://www.w3.org/TR/sparql12-query/#rExprTripleTermSubject)
|
|
132
133
|
*/
|
|
133
|
-
export declare const exprTripleTermSubject:
|
|
134
|
+
export declare const exprTripleTermSubject: SparqlRuleDef<'exprTripleTermSubject', T11.IriTerm | T11.VariableTerm | T11.LiteralTerm>;
|
|
134
135
|
/**
|
|
135
136
|
* [[137]](https://www.w3.org/TR/sparql12-query/#rExprTripleTermObject)
|
|
136
137
|
*/
|
|
137
|
-
export declare const exprTripleTermObject:
|
|
138
|
+
export declare const exprTripleTermObject: SparqlRuleDef<'exprTripleTermObject', RuleDefReturn<typeof exprTripleTermSubject> | BaseQuadTerm>;
|
|
138
139
|
export declare const builtinLangDir: S11.RuleDefExpressionFunctionX<"builtInLangdir", [T11.Expression]>;
|
|
139
140
|
export declare const builtinLangStrDir: S11.RuleDefExpressionFunctionX<"builtInStrLangdir", [T11.Expression, T11.Expression, T11.Expression]>;
|
|
140
141
|
export declare const builtinHasLang: S11.RuleDefExpressionFunctionX<"builtInHasLang", [T11.Expression]>;
|