@traqula/rules-sparql-1-1 1.0.2 → 1.0.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sparql11HelperTypes.js","sourceRoot":"","sources":["../../../lib/sparql11HelperTypes.ts"],"names":[],"mappings":"","sourcesContent":["import type { GeneratorRule, ParserRule, traqulaIndentation, traqulaNewlineAlternative } from '@traqula/core';\nimport type { AstFactory } from './astFactory.js';\n\nexport interface SparqlContext {\n /**\n * Data-factoryMixins to be used when constructing rdf primitives.\n */\n astFactory: AstFactory;\n /**\n * Current scoped prefixes.
|
|
1
|
+
{"version":3,"file":"sparql11HelperTypes.js","sourceRoot":"","sources":["../../../lib/sparql11HelperTypes.ts"],"names":[],"mappings":"","sourcesContent":["import type { GeneratorRule, ParserRule, traqulaIndentation, traqulaNewlineAlternative } from '@traqula/core';\nimport type { AstFactory } from './astFactory.js';\n\nexport interface SparqlContext {\n /**\n * Data-factoryMixins to be used when constructing rdf primitives.\n */\n astFactory: AstFactory;\n /**\n * Current scoped prefixes. Only used to validate parsed prefixes are known.\n */\n prefixes: Record<string, string>;\n /**\n * Currently scoped base IRI. Only used to validate a base is set when parsing.\n */\n baseIRI: string | undefined;\n /**\n * Can be used to disable the validation that used variables in a select clause are in scope.\n */\n skipValidation: boolean;\n /**\n * Set of queryModes. Primarily used for note 8, 14.\n */\n parseMode: Set<'canParseVars' | 'canCreateBlankNodes' | 'inAggregate' | 'canParseAggregate' | string>;\n}\n\nexport interface SparqlGeneratorContext {\n astFactory: AstFactory;\n indentInc: number;\n origSource: string;\n [traqulaIndentation]: number;\n [traqulaNewlineAlternative]: string;\n}\n\nexport type SparqlRule<\n /**\n * Name of grammar rule, should be a strict subtype of string like 'myGrammarRule'.\n */\n NameType extends string = string,\n /**\n * Type that will be returned after a correct parse of this rule.\n * This type will be the return type of calling SUBRULE with this grammar rule.\n */\n ReturnType = unknown,\n GenInputType = ReturnType,\n /**\n * Function arguments that can be given to convey the state of the current parse operation.\n */\n ParamType extends any[] = [],\n> = SparqlGrammarRule<NameType, ReturnType, ParamType>\n & SparqlGeneratorRule<NameType, GenInputType, ParamType>;\nexport type SparqlGeneratorRule<\n /**\n * Name of grammar rule, should be a strict subtype of string like 'myGrammarRule'.\n */\n NameType extends string = string,\n /**\n * Type that will be returned after a correct parse of this rule.\n * This type will be the return type of calling SUBRULE with this grammar rule.\n */\n ReturnType = unknown,\n /**\n * Function arguments that can be given to convey the state of the current parse operation.\n */\n ParamType extends any[] = [],\n> = GeneratorRule<SparqlGeneratorContext, NameType, ReturnType, ParamType>;\nexport type SparqlGrammarRule<\n /**\n * Name of grammar rule, should be a strict subtype of string like 'myGrammarRule'.\n */\n NameType extends string = string,\n /**\n * Type that will be returned after a correct parse of this rule.\n * This type will be the return type of calling SUBRULE with this grammar rule.\n */\n ReturnType = unknown,\n /**\n * Function arguments that can be given to convey the state of the current parse operation.\n */\n ParamType extends any[] = [],\n> = ParserRule<SparqlContext, NameType, ReturnType, ParamType>;\n"]}
|
|
@@ -9,7 +9,7 @@ export declare const builtInDatatype: import("../expressionHelpers.js").RuleDefE
|
|
|
9
9
|
export declare const builtInBound: import("../expressionHelpers.js").RuleDefExpressionFunctionX<"builtInBound", [import("../Sparql11types.js").TermVariable]>;
|
|
10
10
|
export declare const builtInIri: import("../expressionHelpers.js").RuleDefExpressionFunctionX<"builtInIri", [Expression]>;
|
|
11
11
|
export declare const builtInUri: import("../expressionHelpers.js").RuleDefExpressionFunctionX<"builtInUri", [Expression]>;
|
|
12
|
-
export declare const builtInBnodeSparqlJs: import("../expressionHelpers.js").RuleDefExpressionFunctionX<"builtInBnode", [
|
|
12
|
+
export declare const builtInBnodeSparqlJs: import("../expressionHelpers.js").RuleDefExpressionFunctionX<"builtInBnode", [] | [Expression]>;
|
|
13
13
|
export declare const builtInRand: import("../expressionHelpers.js").RuleDefExpressionFunctionX<"builtInRand", []>;
|
|
14
14
|
export declare const builtInAbs: import("../expressionHelpers.js").RuleDefExpressionFunctionX<"builtInAbs", [Expression]>;
|
|
15
15
|
export declare const builtInCeil: import("../expressionHelpers.js").RuleDefExpressionFunctionX<"builtInCeil", [Expression]>;
|
|
@@ -32,5 +32,5 @@ export declare const triplesNode: SparqlRule<"triplesNode", TripleCollection>;
|
|
|
32
32
|
export declare const triplesNodePath: SparqlRule<"triplesNodePath", TripleCollection>;
|
|
33
33
|
export declare const blankNodePropertyList: SparqlRule<"blankNodePropertyList", TripleCollectionBlankNodeProperties>;
|
|
34
34
|
export declare const blankNodePropertyListPath: SparqlRule<"blankNodePropertyListPath", TripleCollectionBlankNodeProperties>;
|
|
35
|
-
export declare const graphNode: SparqlRule<"graphNode",
|
|
36
|
-
export declare const graphNodePath: SparqlRule<"graphNodePath",
|
|
35
|
+
export declare const graphNode: SparqlRule<"graphNode", Term | TripleCollection>;
|
|
36
|
+
export declare const graphNodePath: SparqlRule<"graphNodePath", Term | TripleCollection>;
|
|
@@ -6,11 +6,11 @@ export interface SparqlContext {
|
|
|
6
6
|
*/
|
|
7
7
|
astFactory: AstFactory;
|
|
8
8
|
/**
|
|
9
|
-
* Current scoped prefixes.
|
|
9
|
+
* Current scoped prefixes. Only used to validate parsed prefixes are known.
|
|
10
10
|
*/
|
|
11
11
|
prefixes: Record<string, string>;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Currently scoped base IRI. Only used to validate a base is set when parsing.
|
|
14
14
|
*/
|
|
15
15
|
baseIRI: string | undefined;
|
|
16
16
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sparql11HelperTypes.js","sourceRoot":"","sources":["../../../lib/sparql11HelperTypes.ts"],"names":[],"mappings":"","sourcesContent":["import type { GeneratorRule, ParserRule, traqulaIndentation, traqulaNewlineAlternative } from '@traqula/core';\nimport type { AstFactory } from './astFactory.js';\n\nexport interface SparqlContext {\n /**\n * Data-factoryMixins to be used when constructing rdf primitives.\n */\n astFactory: AstFactory;\n /**\n * Current scoped prefixes.
|
|
1
|
+
{"version":3,"file":"sparql11HelperTypes.js","sourceRoot":"","sources":["../../../lib/sparql11HelperTypes.ts"],"names":[],"mappings":"","sourcesContent":["import type { GeneratorRule, ParserRule, traqulaIndentation, traqulaNewlineAlternative } from '@traqula/core';\nimport type { AstFactory } from './astFactory.js';\n\nexport interface SparqlContext {\n /**\n * Data-factoryMixins to be used when constructing rdf primitives.\n */\n astFactory: AstFactory;\n /**\n * Current scoped prefixes. Only used to validate parsed prefixes are known.\n */\n prefixes: Record<string, string>;\n /**\n * Currently scoped base IRI. Only used to validate a base is set when parsing.\n */\n baseIRI: string | undefined;\n /**\n * Can be used to disable the validation that used variables in a select clause are in scope.\n */\n skipValidation: boolean;\n /**\n * Set of queryModes. Primarily used for note 8, 14.\n */\n parseMode: Set<'canParseVars' | 'canCreateBlankNodes' | 'inAggregate' | 'canParseAggregate' | string>;\n}\n\nexport interface SparqlGeneratorContext {\n astFactory: AstFactory;\n indentInc: number;\n origSource: string;\n [traqulaIndentation]: number;\n [traqulaNewlineAlternative]: string;\n}\n\nexport type SparqlRule<\n /**\n * Name of grammar rule, should be a strict subtype of string like 'myGrammarRule'.\n */\n NameType extends string = string,\n /**\n * Type that will be returned after a correct parse of this rule.\n * This type will be the return type of calling SUBRULE with this grammar rule.\n */\n ReturnType = unknown,\n GenInputType = ReturnType,\n /**\n * Function arguments that can be given to convey the state of the current parse operation.\n */\n ParamType extends any[] = [],\n> = SparqlGrammarRule<NameType, ReturnType, ParamType>\n & SparqlGeneratorRule<NameType, GenInputType, ParamType>;\nexport type SparqlGeneratorRule<\n /**\n * Name of grammar rule, should be a strict subtype of string like 'myGrammarRule'.\n */\n NameType extends string = string,\n /**\n * Type that will be returned after a correct parse of this rule.\n * This type will be the return type of calling SUBRULE with this grammar rule.\n */\n ReturnType = unknown,\n /**\n * Function arguments that can be given to convey the state of the current parse operation.\n */\n ParamType extends any[] = [],\n> = GeneratorRule<SparqlGeneratorContext, NameType, ReturnType, ParamType>;\nexport type SparqlGrammarRule<\n /**\n * Name of grammar rule, should be a strict subtype of string like 'myGrammarRule'.\n */\n NameType extends string = string,\n /**\n * Type that will be returned after a correct parse of this rule.\n * This type will be the return type of calling SUBRULE with this grammar rule.\n */\n ReturnType = unknown,\n /**\n * Function arguments that can be given to convey the state of the current parse operation.\n */\n ParamType extends any[] = [],\n> = ParserRule<SparqlContext, NameType, ReturnType, ParamType>;\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@traqula/rules-sparql-1-1",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"description": "TRAQULA Lexer and Grammar Rules for sparql 1.1",
|
|
6
6
|
"lsd:module": true,
|
|
7
7
|
"license": "MIT",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@traqula/chevrotain": "^1.0.0",
|
|
45
|
-
"@traqula/core": "^1.0.
|
|
45
|
+
"@traqula/core": "^1.0.3"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "100f8110af8ae3288390f37652e516c8d4d5d124"
|
|
48
48
|
}
|