@traqula/rules-sparql-1-2 1.0.1 → 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.
|
@@ -22,6 +22,7 @@ function completeGeneratorContext(context) {
|
|
|
22
22
|
offset: context.offset,
|
|
23
23
|
indentInc: context.indentInc ?? 2,
|
|
24
24
|
[core_1.traqulaIndentation]: context[core_1.traqulaIndentation] ?? 0,
|
|
25
|
+
[core_1.traqulaNewlineAlternative]: context[core_1.traqulaNewlineAlternative] ?? ' ',
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
function copyParseContext(context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parserUtils.js","sourceRoot":"","sources":["../../../lib/parserUtils.ts"],"names":[],"mappings":";;;AAKA,oDAUC;AAED,
|
|
1
|
+
{"version":3,"file":"parserUtils.js","sourceRoot":"","sources":["../../../lib/parserUtils.ts"],"names":[],"mappings":";;;AAKA,oDAUC;AAED,4DAWC;AAED,4CASC;AAvCD,wCAAmG;AACnG,mDAA6C;AAI7C,SAAgB,oBAAoB,CAClC,OAA+B;IAE/B,OAAO;QACL,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,IAAI,0BAAU,CAAC,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;QACjF,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,QAAQ,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE;QACjC,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAE,cAAc,EAAE,qBAAqB,CAAE,CAAC;QAC9G,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,KAAK;KAChD,CAAC;AACJ,CAAC;AAED,SAAgB,wBAAwB,CACtC,OAA8D;IAE9D,OAAO;QACL,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,IAAI,0BAAU,EAAE;QAClD,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,EAAE;QACpC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,CAAC;QACjC,CAAC,yBAAkB,CAAC,EAAE,OAAO,CAAC,yBAAkB,CAAC,IAAI,CAAC;QACtD,CAAC,gCAAyB,CAAC,EAAE,OAAO,CAAC,gCAAyB,CAAC,IAAI,GAAG;KACvE,CAAC;AACJ,CAAC;AAED,SAAgB,gBAAgB,CAE9B,OAAU;IAEV,OAAO;QACL,GAAG,OAAO;QACV,QAAQ,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE;QACjC,SAAS,EAAE,IAAI,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC;KACtC,CAAC;AACJ,CAAC;AAED,MAAa,cAAe,SAAQ,0BAAkC;CAAG;AAAzE,wCAAyE","sourcesContent":["import { TransformerSubTyped, traqulaIndentation, traqulaNewlineAlternative } from '@traqula/core';\nimport { AstFactory } from './AstFactory.js';\nimport type { SparqlContext, SparqlGeneratorContext } from './sparql12HelperTypes.js';\nimport type { Sparql12Nodes } from './sparql12Types.js';\n\nexport function completeParseContext(\n context: Partial<SparqlContext>,\n): SparqlContext {\n return {\n astFactory: context.astFactory ?? new AstFactory({ tracksSourceLocation: false }),\n baseIRI: context.baseIRI,\n prefixes: { ...context.prefixes },\n parseMode: context.parseMode ? new Set(context.parseMode) : new Set([ 'canParseVars', 'canCreateBlankNodes' ]),\n skipValidation: context.skipValidation ?? false,\n };\n}\n\nexport function completeGeneratorContext(\n context: Partial<SparqlGeneratorContext & { offset?: number }>,\n): SparqlGeneratorContext & { offset?: number } {\n return {\n astFactory: context.astFactory ?? new AstFactory(),\n origSource: context.origSource ?? '',\n offset: context.offset,\n indentInc: context.indentInc ?? 2,\n [traqulaIndentation]: context[traqulaIndentation] ?? 0,\n [traqulaNewlineAlternative]: context[traqulaNewlineAlternative] ?? ' ',\n };\n}\n\nexport function copyParseContext<T extends\nPartial<SparqlContext & SparqlGeneratorContext & { origSource: string; offset?: number }>>(\n context: T,\n): T {\n return {\n ...context,\n prefixes: { ...context.prefixes },\n parseMode: new Set(context.parseMode),\n };\n}\n\nexport class AstTransformer extends TransformerSubTyped<Sparql12Nodes> {}\n"]}
|
|
@@ -57,12 +57,12 @@ export declare const triplesSameSubjectPath: SparqlGrammarRule<"triplesSameSubje
|
|
|
57
57
|
* OVERRIDING RULE: {@link S11.object}.
|
|
58
58
|
* [[86]](https://www.w3.org/TR/sparql12-query/#rObject) Used by ObjectList
|
|
59
59
|
*/
|
|
60
|
-
export declare const object: SparqlGrammarRule<"object", TripleNesting, [GraphNode, T11.TermIriFull | T11.TermIriPrefixed | T11.
|
|
60
|
+
export declare const object: SparqlGrammarRule<"object", TripleNesting, [GraphNode, T11.TermIriFull | T11.TermIriPrefixed | T11.PropertyPathChain | T11.PathModified | T11.PathNegated | T11.TermVariable]>;
|
|
61
61
|
/**
|
|
62
62
|
* OVERRIDING RULE: {@link S11.objectPath}.
|
|
63
63
|
* [[87]](https://www.w3.org/TR/sparql12-query/#rTriplesSameSubjectPath) Used by ObjectListPath
|
|
64
64
|
*/
|
|
65
|
-
export declare const objectPath: SparqlGrammarRule<"objectPath", TripleNesting, [GraphNode, T11.TermIriFull | T11.TermIriPrefixed | T11.
|
|
65
|
+
export declare const objectPath: SparqlGrammarRule<"objectPath", TripleNesting, [GraphNode, T11.TermIriFull | T11.TermIriPrefixed | T11.PropertyPathChain | T11.PathModified | T11.PathNegated | T11.TermVariable]>;
|
|
66
66
|
/**
|
|
67
67
|
* [[109]](https://www.w3.org/TR/sparql12-query/#rAnnotationPath)
|
|
68
68
|
*/
|
package/dist/esm/lib/lexer.d.ts
CHANGED
|
@@ -17,4 +17,4 @@ export declare const buildInSUBJECT: import("@traqula/core").NamedToken<"BuiltIn
|
|
|
17
17
|
export declare const buildInPREDICATE: import("@traqula/core").NamedToken<"BuiltInPredicate">;
|
|
18
18
|
export declare const buildInOBJECT: import("@traqula/core").NamedToken<"BuiltInObject">;
|
|
19
19
|
export declare const LANG_DIR: import("@traqula/core").NamedToken<"LANG_DIR">;
|
|
20
|
-
export declare const sparql12LexerBuilder: LexerBuilder<"
|
|
20
|
+
export declare const sparql12LexerBuilder: LexerBuilder<"Version" | "Tilde" | "AnnotationOpen" | "AnnotationClose" | "ReificationOpen" | "ReificationClose" | "TripleTermOpen" | "TripleTermClose" | "BuiltInLangdir" | "BuiltInStrLangdir" | "BuiltInHasLang" | "BuiltInHasLangdir" | "BuiltInIsTriple" | "BuiltInTriple" | "BuiltInSubject" | "BuiltInPredicate" | "BuiltInObject" | "LANG_DIR" | "BuiltInStr" | "BuiltInLang" | "BuiltInLangmatches" | "BuiltInDatatype" | "BuiltInBound" | "BuiltInIri" | "BuiltInUri" | "BuiltInBnode" | "BuiltInRand" | "BuiltInAbs" | "BuiltInCeil" | "BuiltInFloor" | "BuiltInRound" | "BuiltInConcat" | "BuiltInStrlen" | "BuiltInUcase" | "BuiltInLcase" | "BuiltInEncode_for_uri" | "BuiltInContains" | "BuiltInStrstarts" | "BuiltInStrends" | "BuiltInStrbefore" | "BuiltInStrafter" | "BuiltInYear" | "BuiltInMonth" | "BuiltInDay" | "BuiltInHours" | "BuiltInMinutes" | "BuiltInSeconds" | "BuiltInTimezone" | "BuiltInTz" | "BuiltInNow" | "BuiltInUuid" | "BuiltInStruuid" | "BuiltInMd5" | "BuiltInSha1" | "BuiltInSha256" | "BuiltInSha384" | "BuiltInSha512" | "BuiltInCoalesce" | "BuiltInIf" | "BuiltInStrlang" | "BuiltInStrdt" | "BuiltInSameterm" | "BuiltInIsiri" | "BuiltInIsuri" | "BuiltInIsblank" | "BuiltInIsliteral" | "BuiltInIsnumeric" | "BuiltInRegex" | "BuiltInSubstr" | "BuiltInReplace" | "BuiltInExists" | "BuiltInNotexists" | "BuiltInCount" | "BuiltInSum" | "BuiltInMin" | "BuiltInMax" | "BuiltInAvg" | "BuiltInSample" | "BuiltInGroup_concat" | "NamedGraph" | "DefaultGraph" | "Graph" | "GraphAll" | "LCurly" | "RCurly" | "Dot" | "Comma" | "Semi" | "LParen" | "RParen" | "LSquare" | "RSquare" | "Pipe" | "Slash" | "Hat" | "Question" | "Star" | "OpPlus" | "OpMinus" | "Exclamation" | "LogicAnd" | "LogicOr" | "Equal" | "NotEqual" | "LessThan" | "GreaterThan" | "LessThanEqual" | "GreaterThanEqual" | "Hathat" | "IriRef" | "PNameLn" | "PNameNs" | "BlankNodeLabel" | "Var1" | "Var2" | "Integer" | "Decimal" | "Double" | "IntegerPositive" | "DecimalPositive" | "DoublePositive" | "IntegerNegative" | "DecimalNegative" | "DoubleNegative" | "StringLiteral1" | "StringLiteral2" | "StringLiteralLong1" | "StringLiteralLong2" | "Ws" | "Comment" | "Nil" | "Anon" | "BaseDecl" | "PrefixDecl" | "Select" | "Distinct" | "Reduced" | "As" | "Construct" | "Describe" | "Ask" | "From" | "Where" | "GroupByGroup" | "By" | "Having" | "Order" | "OrderAsc" | "OrderDesc" | "Limit" | "Offset" | "Values" | "Load" | "Silent" | "LoadInto" | "Clear" | "Drop" | "Create" | "Add" | "To" | "Move" | "Copy" | "ModifyWith" | "DeleteDataClause" | "DeleteWhereClause" | "DeleteClause" | "InsertDataClause" | "InsertClause" | "UsingClause" | "Optional" | "Service" | "Bind" | "Undef" | "Minus" | "Union" | "Filter" | "a" | "True" | "False" | "In" | "NotIn" | "Separator">;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransformerSubTyped, traqulaIndentation } from '@traqula/core';
|
|
1
|
+
import { TransformerSubTyped, traqulaIndentation, traqulaNewlineAlternative } from '@traqula/core';
|
|
2
2
|
import { AstFactory } from './AstFactory.js';
|
|
3
3
|
export function completeParseContext(context) {
|
|
4
4
|
return {
|
|
@@ -16,6 +16,7 @@ export function completeGeneratorContext(context) {
|
|
|
16
16
|
offset: context.offset,
|
|
17
17
|
indentInc: context.indentInc ?? 2,
|
|
18
18
|
[traqulaIndentation]: context[traqulaIndentation] ?? 0,
|
|
19
|
+
[traqulaNewlineAlternative]: context[traqulaNewlineAlternative] ?? ' ',
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
22
|
export function copyParseContext(context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parserUtils.js","sourceRoot":"","sources":["../../../lib/parserUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"parserUtils.js","sourceRoot":"","sources":["../../../lib/parserUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAI7C,MAAM,UAAU,oBAAoB,CAClC,OAA+B;IAE/B,OAAO;QACL,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,IAAI,UAAU,CAAC,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;QACjF,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,QAAQ,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE;QACjC,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAE,cAAc,EAAE,qBAAqB,CAAE,CAAC;QAC9G,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,KAAK;KAChD,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CACtC,OAA8D;IAE9D,OAAO;QACL,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,IAAI,UAAU,EAAE;QAClD,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,EAAE;QACpC,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,CAAC;QACjC,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC;QACtD,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAC,yBAAyB,CAAC,IAAI,GAAG;KACvE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAE9B,OAAU;IAEV,OAAO;QACL,GAAG,OAAO;QACV,QAAQ,EAAE,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE;QACjC,SAAS,EAAE,IAAI,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC;KACtC,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,cAAe,SAAQ,mBAAkC;CAAG","sourcesContent":["import { TransformerSubTyped, traqulaIndentation, traqulaNewlineAlternative } from '@traqula/core';\nimport { AstFactory } from './AstFactory.js';\nimport type { SparqlContext, SparqlGeneratorContext } from './sparql12HelperTypes.js';\nimport type { Sparql12Nodes } from './sparql12Types.js';\n\nexport function completeParseContext(\n context: Partial<SparqlContext>,\n): SparqlContext {\n return {\n astFactory: context.astFactory ?? new AstFactory({ tracksSourceLocation: false }),\n baseIRI: context.baseIRI,\n prefixes: { ...context.prefixes },\n parseMode: context.parseMode ? new Set(context.parseMode) : new Set([ 'canParseVars', 'canCreateBlankNodes' ]),\n skipValidation: context.skipValidation ?? false,\n };\n}\n\nexport function completeGeneratorContext(\n context: Partial<SparqlGeneratorContext & { offset?: number }>,\n): SparqlGeneratorContext & { offset?: number } {\n return {\n astFactory: context.astFactory ?? new AstFactory(),\n origSource: context.origSource ?? '',\n offset: context.offset,\n indentInc: context.indentInc ?? 2,\n [traqulaIndentation]: context[traqulaIndentation] ?? 0,\n [traqulaNewlineAlternative]: context[traqulaNewlineAlternative] ?? ' ',\n };\n}\n\nexport function copyParseContext<T extends\nPartial<SparqlContext & SparqlGeneratorContext & { origSource: string; offset?: number }>>(\n context: T,\n): T {\n return {\n ...context,\n prefixes: { ...context.prefixes },\n parseMode: new Set(context.parseMode),\n };\n}\n\nexport class AstTransformer extends TransformerSubTyped<Sparql12Nodes> {}\n"]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@traqula/rules-sparql-1-2",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.3",
|
|
5
5
|
"description": "Traqula Lexer and Grammar Rules for sparql 1.2",
|
|
6
6
|
"lsd:module": true,
|
|
7
7
|
"license": "MIT",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"build:cjs": "node \"../../node_modules/typescript/bin/tsc\" -b tsconfig.cjs.json"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@traqula/core": "^1.0.
|
|
45
|
-
"@traqula/rules-sparql-1-1": "^1.0.
|
|
44
|
+
"@traqula/core": "^1.0.3",
|
|
45
|
+
"@traqula/rules-sparql-1-1": "^1.0.3"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "100f8110af8ae3288390f37652e516c8d4d5d124"
|
|
48
48
|
}
|