@traqula/rules-sparql-1-1 0.0.1-alpha.176 → 0.0.1
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/RoundTripTypes.d.ts +379 -0
- package/lib/RoundTripTypes.js +2 -0
- package/lib/RoundTripTypes.js.map +1 -0
- package/lib/Sparql11types.d.ts +18 -245
- package/lib/Sparql11types.js.map +1 -1
- package/lib/SparqlParser.d.ts +13 -4
- package/lib/SparqlParser.js +7 -4
- package/lib/SparqlParser.js.map +1 -1
- package/lib/expressionHelpers.d.ts +8 -19
- package/lib/expressionHelpers.js +40 -103
- package/lib/expressionHelpers.js.map +1 -1
- package/lib/factory.d.ts +447 -0
- package/lib/factory.js +105 -0
- package/lib/factory.js.map +1 -0
- package/lib/factoryMixins/ContextFactory.d.ts +38 -0
- package/lib/factoryMixins/ContextFactory.js +30 -0
- package/lib/factoryMixins/ContextFactory.js.map +1 -0
- package/lib/factoryMixins/ExpressionFactory.d.ts +60 -0
- package/lib/factoryMixins/ExpressionFactory.js +83 -0
- package/lib/factoryMixins/ExpressionFactory.js.map +1 -0
- package/lib/factoryMixins/GraphRefFactory.d.ts +43 -0
- package/lib/factoryMixins/GraphRefFactory.js +51 -0
- package/lib/factoryMixins/GraphRefFactory.js.map +1 -0
- package/lib/factoryMixins/PathFactory.d.ts +51 -0
- package/lib/factoryMixins/PathFactory.js +68 -0
- package/lib/factoryMixins/PathFactory.js.map +1 -0
- package/lib/factoryMixins/Patternfactory.d.ts +55 -0
- package/lib/factoryMixins/Patternfactory.js +98 -0
- package/lib/factoryMixins/Patternfactory.js.map +1 -0
- package/lib/factoryMixins/QueryFactory.d.ts +41 -0
- package/lib/factoryMixins/QueryFactory.js +43 -0
- package/lib/factoryMixins/QueryFactory.js.map +1 -0
- package/lib/factoryMixins/SolutionModifiersFactory.d.ts +43 -0
- package/lib/factoryMixins/SolutionModifiersFactory.js +55 -0
- package/lib/factoryMixins/SolutionModifiersFactory.js.map +1 -0
- package/lib/factoryMixins/TermFactory.d.ts +76 -0
- package/lib/factoryMixins/TermFactory.js +84 -0
- package/lib/factoryMixins/TermFactory.js.map +1 -0
- package/lib/factoryMixins/UpdateOperationFactory.d.ts +68 -0
- package/lib/factoryMixins/UpdateOperationFactory.js +126 -0
- package/lib/factoryMixins/UpdateOperationFactory.js.map +1 -0
- package/lib/factoryMixins/mixins.d.ts +14 -0
- package/lib/factoryMixins/mixins.js +20 -0
- package/lib/factoryMixins/mixins.js.map +1 -0
- package/lib/grammar/builtIn.d.ts +59 -59
- package/lib/grammar/builtIn.js +50 -57
- package/lib/grammar/builtIn.js.map +1 -1
- package/lib/grammar/dataSetClause.d.ts +22 -9
- package/lib/grammar/dataSetClause.js +57 -14
- package/lib/grammar/dataSetClause.js.map +1 -1
- package/lib/grammar/expression.d.ts +12 -16
- package/lib/grammar/expression.js +224 -296
- package/lib/grammar/expression.js.map +1 -1
- package/lib/grammar/general.d.ts +8 -8
- package/lib/grammar/general.js +59 -94
- package/lib/grammar/general.js.map +1 -1
- package/lib/grammar/literals.d.ts +16 -13
- package/lib/grammar/literals.js +161 -144
- package/lib/grammar/literals.js.map +1 -1
- package/lib/grammar/propertyPaths.d.ts +16 -12
- package/lib/grammar/propertyPaths.js +100 -129
- package/lib/grammar/propertyPaths.js.map +1 -1
- package/lib/grammar/queryUnit/queryUnit.d.ts +13 -17
- package/lib/grammar/queryUnit/queryUnit.js +195 -329
- package/lib/grammar/queryUnit/queryUnit.js.map +1 -1
- package/lib/grammar/solutionModifier.d.ts +12 -11
- package/lib/grammar/solutionModifier.js +125 -109
- package/lib/grammar/solutionModifier.js.map +1 -1
- package/lib/grammar/tripleBlock.d.ts +24 -33
- package/lib/grammar/tripleBlock.js +172 -126
- package/lib/grammar/tripleBlock.js.map +1 -1
- package/lib/grammar/updateUnit/updateUnit.d.ts +28 -33
- package/lib/grammar/updateUnit/updateUnit.js +282 -367
- package/lib/grammar/updateUnit/updateUnit.js.map +1 -1
- package/lib/grammar/whereClause.d.ts +20 -19
- package/lib/grammar/whereClause.js +232 -245
- package/lib/grammar/whereClause.js.map +1 -1
- package/lib/grammar-helpers/utils.d.ts +0 -4
- package/lib/grammar-helpers/utils.js +0 -37
- package/lib/grammar-helpers/utils.js.map +1 -1
- package/lib/index.cjs +3061 -2438
- package/lib/index.d.ts +4 -2
- package/lib/index.js +4 -2
- package/lib/index.js.map +1 -1
- package/lib/lexer/lexer.d.ts +4 -3
- package/lib/lexer/lexer.js +11 -7
- package/lib/lexer/lexer.js.map +1 -1
- package/lib/lexer/terminals.d.ts +0 -34
- package/lib/lexer/terminals.js +35 -37
- package/lib/lexer/terminals.js.map +1 -1
- package/lib/utils.d.ts +0 -3
- package/lib/utils.js +0 -6
- package/lib/utils.js.map +1 -1
- package/lib/validation/validators.d.ts +14 -0
- package/lib/validation/validators.js +235 -0
- package/lib/validation/validators.js.map +1 -0
- package/package.json +6 -8
- package/lib/Wildcard.d.ts +0 -9
- package/lib/Wildcard.js +0 -19
- package/lib/Wildcard.js.map +0 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * as gram from './grammar';
|
|
2
2
|
export * from './grammar-helpers/utils';
|
|
3
3
|
export * as lex from './lexer';
|
|
4
|
-
export * from './utils';
|
|
5
4
|
export * from './expressionHelpers';
|
|
6
5
|
export * from './Sparql11types';
|
|
7
6
|
export * from './SparqlParser';
|
|
8
|
-
export * from './
|
|
7
|
+
export * from './RoundTripTypes';
|
|
8
|
+
export * from './factory';
|
|
9
|
+
export * from './validation/validators';
|
|
10
|
+
export * from './utils';
|
package/lib/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * as gram from './grammar';
|
|
2
2
|
export * from './grammar-helpers/utils';
|
|
3
3
|
export * as lex from './lexer';
|
|
4
|
-
export * from './utils';
|
|
5
4
|
export * from './expressionHelpers';
|
|
6
5
|
export * from './Sparql11types';
|
|
7
6
|
export * from './SparqlParser';
|
|
8
|
-
export * from './
|
|
7
|
+
export * from './RoundTripTypes';
|
|
8
|
+
export * from './factory';
|
|
9
|
+
export * from './validation/validators';
|
|
10
|
+
export * from './utils';
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAC/B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,cAAc,yBAAyB,CAAC;AACxC,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC","sourcesContent":["export * as gram from './grammar';\nexport * from './grammar-helpers/utils';\nexport * as lex from './lexer';\nexport * from './expressionHelpers';\nexport * from './Sparql11types';\nexport * from './SparqlParser';\nexport * from './RoundTripTypes';\nexport * from './factory';\nexport * from './validation/validators';\nexport * from './utils';\n"]}
|
package/lib/lexer/lexer.d.ts
CHANGED
|
@@ -10,7 +10,8 @@ export declare const describe: import("@traqula/core").NamedToken<"Describe">;
|
|
|
10
10
|
export declare const ask: import("@traqula/core").NamedToken<"Ask">;
|
|
11
11
|
export declare const from: import("@traqula/core").NamedToken<"From">;
|
|
12
12
|
export declare const where: import("@traqula/core").NamedToken<"Where">;
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const groupByGroup: import("@traqula/core").NamedToken<"GroupByGroup">;
|
|
14
|
+
export declare const by: import("@traqula/core").NamedToken<"By">;
|
|
14
15
|
export declare const having: import("@traqula/core").NamedToken<"Having">;
|
|
15
16
|
export declare const order: import("@traqula/core").NamedToken<"Order">;
|
|
16
17
|
export declare const orderAsc: import("@traqula/core").NamedToken<"OrderAsc">;
|
|
@@ -46,8 +47,8 @@ export declare const false_: import("@traqula/core").NamedToken<"False">;
|
|
|
46
47
|
export declare const in_: import("@traqula/core").NamedToken<"In">;
|
|
47
48
|
export declare const notIn: import("@traqula/core").NamedToken<"NotIn">;
|
|
48
49
|
export declare const separator: import("@traqula/core").NamedToken<"Separator">;
|
|
49
|
-
export declare const allBaseTokens: LexerBuilder<"a" | "BaseDecl" | "PrefixDecl" | "Select" | "Distinct" | "Reduced" | "As" | "Construct" | "Describe" | "Ask" | "From" | "Where" | "
|
|
50
|
+
export declare const allBaseTokens: LexerBuilder<"a" | "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" | "DeleteClause" | "InsertClause" | "DataClause" | "UsingClause" | "Optional" | "Service" | "Bind" | "Undef" | "Minus" | "Union" | "Filter" | "True" | "False" | "In" | "NotIn" | "Separator">;
|
|
50
51
|
/**
|
|
51
52
|
* [!!!ORDER MATTERS!!!](https://chevrotain.io/docs/tutorial/step1_lexing.html#creating-the-lexer)
|
|
52
53
|
*/
|
|
53
|
-
export declare const sparql11Tokens: LexerBuilder<"a" | "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" | "LangTag" | "Integer" | "Decimal" | "Double" | "InterferePositive" | "DecimalPositive" | "DoublePositive" | "IntegerNegative" | "DecimalNegative" | "DoubleNegative" | "StringLiteral1" | "StringLiteral2" | "StringLiteralLong1" | "StringLiteralLong2" | "Ws" | "Comment" | "Nil" | "Anon" | "BaseDecl" | "PrefixDecl" | "Select" | "Distinct" | "Reduced" | "As" | "Construct" | "Describe" | "Ask" | "From" | "Where" | "
|
|
54
|
+
export declare const sparql11Tokens: LexerBuilder<"a" | "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" | "LangTag" | "Integer" | "Decimal" | "Double" | "InterferePositive" | "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" | "DeleteClause" | "InsertClause" | "DataClause" | "UsingClause" | "Optional" | "Service" | "Bind" | "Undef" | "Minus" | "Union" | "Filter" | "True" | "False" | "In" | "NotIn" | "Separator">;
|
package/lib/lexer/lexer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable require-unicode-regexp */
|
|
2
2
|
import { LexerBuilder, createToken } from '@traqula/core';
|
|
3
|
-
import { allBuiltInCalls, avg, datatype } from './BuildinCalls';
|
|
4
|
-
import { allGraphTokens } from './graph';
|
|
3
|
+
import { allBuiltInCalls, avg, datatype, groupConcat } from './BuildinCalls';
|
|
4
|
+
import { allGraphTokens, graphAll } from './graph';
|
|
5
5
|
import { allSymbols } from './symbols';
|
|
6
6
|
import { allTerminals } from './terminals';
|
|
7
7
|
export const baseDecl = createToken({ name: 'BaseDecl', pattern: /base/i, label: 'BASE' });
|
|
@@ -15,9 +15,10 @@ export const describe = createToken({ name: 'Describe', pattern: /describe/i, la
|
|
|
15
15
|
export const ask = createToken({ name: 'Ask', pattern: /ask/i, label: 'ASK' });
|
|
16
16
|
export const from = createToken({ name: 'From', pattern: /from/i, label: 'FROM' });
|
|
17
17
|
export const where = createToken({ name: 'Where', pattern: /where/i, label: 'WHERE' });
|
|
18
|
-
export const
|
|
18
|
+
export const groupByGroup = createToken({ name: 'GroupByGroup', pattern: /group/i, label: '_GROUP_ BY' });
|
|
19
|
+
export const by = createToken({ name: 'By', pattern: /by/i, label: 'BY' });
|
|
19
20
|
export const having = createToken({ name: 'Having', pattern: /having/i, label: 'HAVING' });
|
|
20
|
-
export const order = createToken({ name: 'Order', pattern: /order
|
|
21
|
+
export const order = createToken({ name: 'Order', pattern: /order/i, label: '_ORDER_ BY' });
|
|
21
22
|
export const orderAsc = createToken({ name: 'OrderAsc', pattern: /asc/i, label: 'ASC' });
|
|
22
23
|
export const orderDesc = createToken({ name: 'OrderDesc', pattern: /desc/i, label: 'DESC' });
|
|
23
24
|
export const limit = createToken({ name: 'Limit', pattern: /limit/i, label: 'LIMIT' });
|
|
@@ -49,9 +50,10 @@ export const a = createToken({ name: 'a', pattern: 'a', label: 'type declaration
|
|
|
49
50
|
export const true_ = createToken({ name: 'True', pattern: /true/i, label: 'true' });
|
|
50
51
|
export const false_ = createToken({ name: 'False', pattern: /false/i, label: 'false' });
|
|
51
52
|
export const in_ = createToken({ name: 'In', pattern: /in/i, label: 'IN' });
|
|
52
|
-
|
|
53
|
+
// eslint-disable-next-line unicorn/better-regex,no-control-regex
|
|
54
|
+
export const notIn = createToken({ name: 'NotIn', pattern: /not[\u0020\u0009\u000D\u000A]+in/i, label: 'NOT IN' });
|
|
53
55
|
export const separator = createToken({ name: 'Separator', pattern: /separator/i, label: 'SEPARATOR' });
|
|
54
|
-
export const allBaseTokens = LexerBuilder.create().add(baseDecl, prefixDecl, select, distinct, reduced, construct, describe, ask, from, where,
|
|
56
|
+
export const allBaseTokens = LexerBuilder.create().add(baseDecl, prefixDecl, select, distinct, reduced, construct, describe, ask, from, where, having, groupByGroup, by, order, orderAsc, orderDesc, limit, offset, values, load, silent, loadInto, clear, drop, create, add, to, move, copy, modifyWith, deleteClause, insertClause, dataClause, usingClause, optional, service, bind, undef, minus, union, filter, as, a, true_, false_, in_, notIn, separator);
|
|
55
57
|
/**
|
|
56
58
|
* [!!!ORDER MATTERS!!!](https://chevrotain.io/docs/tutorial/step1_lexing.html#creating-the-lexer)
|
|
57
59
|
*/
|
|
@@ -62,5 +64,7 @@ export const sparql11Tokens = LexerBuilder
|
|
|
62
64
|
.merge(allGraphTokens)
|
|
63
65
|
.merge(allSymbols)
|
|
64
66
|
.moveBefore(datatype, dataClause)
|
|
65
|
-
.moveAfter(avg, a)
|
|
67
|
+
.moveAfter(avg, a)
|
|
68
|
+
.moveBefore(a, graphAll)
|
|
69
|
+
.moveAfter(groupConcat, groupByGroup);
|
|
66
70
|
//# sourceMappingURL=lexer.js.map
|
package/lib/lexer/lexer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lexer.js","sourceRoot":"","sources":["lexer.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;AAC3F,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;AACnG,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC3F,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE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QAAQ,EACR,UAAU,EACV,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,EACH,IAAI,EACJ,KAAK,EACL,OAAO,EACP,MAAM,EACN,KAAK,EACL,QAAQ,EACR,SAAS,EACT,KAAK,EACL,MAAM,EACN,MAAM,EACN,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,MAAM,EACN,GAAG,EACH,EAAE,EACF,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,MAAM,EACN,EAAE,EACF,CAAC,EACD,KAAK,EACL,MAAM,EACN,GAAG,EACH,KAAK,EACL,SAAS,CACV,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY;KACvC,MAAM,CAAC,YAAY,CAAC;KACpB,KAAK,CAAC,aAAa,CAAC;KACpB,KAAK,CAAC,eAAe,CAAC;KACtB,KAAK,CAAC,cAAc,CAAC;KACrB,KAAK,CAAC,UAAU,CAAC;KACjB,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC;KAChC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC","sourcesContent":["/* eslint-disable require-unicode-regexp */\nimport { LexerBuilder, createToken } from '@traqula/core';\nimport { allBuiltInCalls, avg, datatype } from './BuildinCalls';\nimport { allGraphTokens } from './graph';\nimport { allSymbols } from './symbols';\nimport { allTerminals } from './terminals';\n\nexport const baseDecl = createToken({ name: 'BaseDecl', pattern: /base/i, label: 'BASE' });\nexport const prefixDecl = createToken({ name: 'PrefixDecl', pattern: /prefix/i, label: 'PREFIX' });\nexport const select = createToken({ name: 'Select', pattern: /select/i, label: 'SELECT' });\nexport const distinct = createToken({ name: 'Distinct', pattern: /distinct/i, label: 'DISTINCT' });\nexport const reduced = createToken({ name: 'Reduced', pattern: /reduced/i, label: 'REDUCED' });\nexport const as = createToken({ name: 'As', pattern: /as/i, label: 'AS' });\nexport const construct = createToken({ name: 'Construct', pattern: /construct/i, label: 'CONSTRUCT' });\nexport const describe = createToken({ name: 'Describe', pattern: /describe/i, label: 'DESCRIBE' });\nexport const ask = createToken({ name: 'Ask', pattern: /ask/i, label: 'ASK' });\nexport const from = createToken({ name: 'From', pattern: /from/i, label: 'FROM' });\nexport const where = createToken({ name: 'Where', pattern: /where/i, label: 'WHERE' });\nexport const groupBy = createToken({ name: 'GroupBy', pattern: /group by/i, label: 'GROUP BY' });\nexport const having = createToken({ name: 'Having', pattern: /having/i, label: 'HAVING' });\nexport const order = createToken({ name: 'Order', pattern: /order by/i, label: 'ORDER BY' });\nexport const orderAsc = createToken({ name: 'OrderAsc', pattern: /asc/i, label: 'ASC' });\nexport const orderDesc = createToken({ name: 'OrderDesc', pattern: /desc/i, label: 'DESC' });\nexport const limit = createToken({ name: 'Limit', pattern: /limit/i, label: 'LIMIT' });\nexport const offset = createToken({ name: 'Offset', pattern: /offset/i, label: 'OFFSET' });\nexport const values = createToken({ name: 'Values', pattern: /values/i, label: 'VALUES' });\nexport const load = createToken({ name: 'Load', pattern: /load/i, label: 'LOAD' });\nexport const silent = createToken({ name: 'Silent', pattern: /silent/i, label: 'SILENT' });\nexport const loadInto = createToken({ name: 'LoadInto', pattern: /into/i, label: 'INTO' });\nexport const clear = createToken({ name: 'Clear', pattern: /clear/i, label: 'CLEAR' });\nexport const drop = createToken({ name: 'Drop', pattern: /drop/i, label: 'DROP' });\nexport const create = createToken({ name: 'Create', pattern: /create/i, label: 'CREATE' });\nexport const add = createToken({ name: 'Add', pattern: /add/i, label: 'ADD' });\nexport const to = createToken({ name: 'To', pattern: /to/i, label: 'TO' });\nexport const move = createToken({ name: 'Move', pattern: /move/i, label: 'MOVE' });\nexport const copy = createToken({ name: 'Copy', pattern: /copy/i, label: 'COPY' });\nexport const modifyWith = createToken({ name: 'ModifyWith', pattern: /with/i, label: 'WITH' });\nexport const deleteClause = createToken({ name: 'DeleteClause', pattern: /delete/i, label: 'DELETE' });\nexport const insertClause = createToken({ name: 'InsertClause', pattern: /insert/i, label: 'INSERT' });\nexport const dataClause = createToken({ name: 'DataClause', pattern: /data/i, label: 'DATA', longer_alt: datatype });\nexport const usingClause = createToken({ name: 'UsingClause', pattern: /using/i, label: 'USING' });\nexport const optional = createToken({ name: 'Optional', pattern: /optional/i, label: 'OPTIONAL' });\nexport const service = createToken({ name: 'Service', pattern: /service/i, label: 'SERVICE' });\nexport const bind = createToken({ name: 'Bind', pattern: /bind/i, label: 'BIND' });\nexport const undef = createToken({ name: 'Undef', pattern: /undef/i, label: 'UNDEF' });\nexport const minus = createToken({ name: 'Minus', pattern: /minus/i, label: 'MINUS' });\nexport const union = createToken({ name: 'Union', pattern: /union/i, label: 'UNION' });\nexport const filter = createToken({ name: 'Filter', pattern: /filter/i, label: 'FILTER' });\nexport const a = createToken({ name: 'a', pattern: 'a', label: 'type declaration \\'a\\'' });\nexport const true_ = createToken({ name: 'True', pattern: /true/i, label: 'true' });\nexport const false_ = createToken({ name: 'False', pattern: /false/i, label: 'false' });\nexport const in_ = createToken({ name: 'In', pattern: /in/i, label: 'IN' });\nexport const notIn = createToken({ name: 'NotIn', pattern: /not in/i, label: 'NOT IN' });\nexport const separator = createToken({ name: 'Separator', pattern: /separator/i, label: 'SEPARATOR' });\n\nexport const allBaseTokens = LexerBuilder.create().add(\n baseDecl,\n prefixDecl,\n select,\n distinct,\n reduced,\n construct,\n describe,\n ask,\n from,\n where,\n groupBy,\n having,\n order,\n orderAsc,\n orderDesc,\n limit,\n offset,\n values,\n load,\n silent,\n loadInto,\n clear,\n drop,\n create,\n add,\n to,\n move,\n copy,\n modifyWith,\n deleteClause,\n insertClause,\n dataClause,\n usingClause,\n optional,\n service,\n bind,\n undef,\n minus,\n union,\n filter,\n as,\n a,\n true_,\n false_,\n in_,\n notIn,\n separator,\n);\n\n/**\n * [!!!ORDER MATTERS!!!](https://chevrotain.io/docs/tutorial/step1_lexing.html#creating-the-lexer)\n */\nexport const sparql11Tokens = LexerBuilder\n .create(allTerminals)\n .merge(allBaseTokens)\n .merge(allBuiltInCalls)\n .merge(allGraphTokens)\n .merge(allSymbols)\n .moveBefore(datatype, dataClause)\n .moveAfter(avg, a);\n"]}
|
|
1
|
+
{"version":3,"file":"lexer.js","sourceRoot":"","sources":["lexer.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;AAC3F,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;AACnG,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;AAC3F,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnG,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC,EAAE,IAAI,EAA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AAG,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,CACpD,QAAQ,EACR,UAAU,EACV,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EACT,QAAQ,EACR,GAAG,EACH,IAAI,EACJ,KAAK,EACL,MAAM,EACN,YAAY,EACZ,EAAE,EACF,KAAK,EACL,QAAQ,EACR,SAAS,EACT,KAAK,EACL,MAAM,EACN,MAAM,EACN,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,MAAM,EACN,GAAG,EACH,EAAE,EACF,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,KAAK,EACL,KAAK,EACL,KAAK,EACL,MAAM,EACN,EAAE,EACF,CAAC,EACD,KAAK,EACL,MAAM,EACN,GAAG,EACH,KAAK,EACL,SAAS,CACV,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY;KACvC,MAAM,CAAC,YAAY,CAAC;KACpB,KAAK,CAAC,aAAa,CAAC;KACpB,KAAK,CAAC,eAAe,CAAC;KACtB,KAAK,CAAC,cAAc,CAAC;KACrB,KAAK,CAAC,UAAU,CAAC;KACjB,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC;KAChC,SAAS,CAAC,GAAG,EAAE,CAAC,CAAC;KACjB,UAAU,CAAC,CAAC,EAAE,QAAQ,CAAC;KACvB,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC","sourcesContent":["/* eslint-disable require-unicode-regexp */\nimport { LexerBuilder, createToken } from '@traqula/core';\nimport { allBuiltInCalls, avg, datatype, groupConcat } from './BuildinCalls';\nimport { allGraphTokens, graphAll } from './graph';\nimport { allSymbols } from './symbols';\nimport { allTerminals } from './terminals';\n\nexport const baseDecl = createToken({ name: 'BaseDecl', pattern: /base/i, label: 'BASE' });\nexport const prefixDecl = createToken({ name: 'PrefixDecl', pattern: /prefix/i, label: 'PREFIX' });\nexport const select = createToken({ name: 'Select', pattern: /select/i, label: 'SELECT' });\nexport const distinct = createToken({ name: 'Distinct', pattern: /distinct/i, label: 'DISTINCT' });\nexport const reduced = createToken({ name: 'Reduced', pattern: /reduced/i, label: 'REDUCED' });\nexport const as = createToken({ name: 'As', pattern: /as/i, label: 'AS' });\nexport const construct = createToken({ name: 'Construct', pattern: /construct/i, label: 'CONSTRUCT' });\nexport const describe = createToken({ name: 'Describe', pattern: /describe/i, label: 'DESCRIBE' });\nexport const ask = createToken({ name: 'Ask', pattern: /ask/i, label: 'ASK' });\nexport const from = createToken({ name: 'From', pattern: /from/i, label: 'FROM' });\nexport const where = createToken({ name: 'Where', pattern: /where/i, label: 'WHERE' });\nexport const groupByGroup = createToken({ name: 'GroupByGroup', pattern: /group/i, label: '_GROUP_ BY' });\nexport const by = createToken({ name: 'By', pattern: /by/i, label: 'BY' });\nexport const having = createToken({ name: 'Having', pattern: /having/i, label: 'HAVING' });\nexport const order = createToken({ name: 'Order', pattern: /order/i, label: '_ORDER_ BY' });\nexport const orderAsc = createToken({ name: 'OrderAsc', pattern: /asc/i, label: 'ASC' });\nexport const orderDesc = createToken({ name: 'OrderDesc', pattern: /desc/i, label: 'DESC' });\nexport const limit = createToken({ name: 'Limit', pattern: /limit/i, label: 'LIMIT' });\nexport const offset = createToken({ name: 'Offset', pattern: /offset/i, label: 'OFFSET' });\nexport const values = createToken({ name: 'Values', pattern: /values/i, label: 'VALUES' });\nexport const load = createToken({ name: 'Load', pattern: /load/i, label: 'LOAD' });\nexport const silent = createToken({ name: 'Silent', pattern: /silent/i, label: 'SILENT' });\nexport const loadInto = createToken({ name: 'LoadInto', pattern: /into/i, label: 'INTO' });\nexport const clear = createToken({ name: 'Clear', pattern: /clear/i, label: 'CLEAR' });\nexport const drop = createToken({ name: 'Drop', pattern: /drop/i, label: 'DROP' });\nexport const create = createToken({ name: 'Create', pattern: /create/i, label: 'CREATE' });\nexport const add = createToken({ name: 'Add', pattern: /add/i, label: 'ADD' });\nexport const to = createToken({ name: 'To', pattern: /to/i, label: 'TO' });\nexport const move = createToken({ name: 'Move', pattern: /move/i, label: 'MOVE' });\nexport const copy = createToken({ name: 'Copy', pattern: /copy/i, label: 'COPY' });\nexport const modifyWith = createToken({ name: 'ModifyWith', pattern: /with/i, label: 'WITH' });\nexport const deleteClause = createToken({ name: 'DeleteClause', pattern: /delete/i, label: 'DELETE' });\nexport const insertClause = createToken({ name: 'InsertClause', pattern: /insert/i, label: 'INSERT' });\nexport const dataClause = createToken({ name: 'DataClause', pattern: /data/i, label: 'DATA', longer_alt: datatype });\nexport const usingClause = createToken({ name: 'UsingClause', pattern: /using/i, label: 'USING' });\nexport const optional = createToken({ name: 'Optional', pattern: /optional/i, label: 'OPTIONAL' });\nexport const service = createToken({ name: 'Service', pattern: /service/i, label: 'SERVICE' });\nexport const bind = createToken({ name: 'Bind', pattern: /bind/i, label: 'BIND' });\nexport const undef = createToken({ name: 'Undef', pattern: /undef/i, label: 'UNDEF' });\nexport const minus = createToken({ name: 'Minus', pattern: /minus/i, label: 'MINUS' });\nexport const union = createToken({ name: 'Union', pattern: /union/i, label: 'UNION' });\nexport const filter = createToken({ name: 'Filter', pattern: /filter/i, label: 'FILTER' });\nexport const a = createToken({ name: 'a', pattern: 'a', label: 'type declaration \\'a\\'' });\nexport const true_ = createToken({ name: 'True', pattern: /true/i, label: 'true' });\nexport const false_ = createToken({ name: 'False', pattern: /false/i, label: 'false' });\nexport const in_ = createToken({ name: 'In', pattern: /in/i, label: 'IN' });\n// eslint-disable-next-line unicorn/better-regex,no-control-regex\nexport const notIn = createToken({ name: 'NotIn', pattern: /not[\\u0020\\u0009\\u000D\\u000A]+in/i, label: 'NOT IN' });\nexport const separator = createToken({ name: 'Separator', pattern: /separator/i, label: 'SEPARATOR' });\n\nexport const allBaseTokens = LexerBuilder.create().add(\n baseDecl,\n prefixDecl,\n select,\n distinct,\n reduced,\n construct,\n describe,\n ask,\n from,\n where,\n having,\n groupByGroup,\n by,\n order,\n orderAsc,\n orderDesc,\n limit,\n offset,\n values,\n load,\n silent,\n loadInto,\n clear,\n drop,\n create,\n add,\n to,\n move,\n copy,\n modifyWith,\n deleteClause,\n insertClause,\n dataClause,\n usingClause,\n optional,\n service,\n bind,\n undef,\n minus,\n union,\n filter,\n as,\n a,\n true_,\n false_,\n in_,\n notIn,\n separator,\n);\n\n/**\n * [!!!ORDER MATTERS!!!](https://chevrotain.io/docs/tutorial/step1_lexing.html#creating-the-lexer)\n */\nexport const sparql11Tokens = LexerBuilder\n .create(allTerminals)\n .merge(allBaseTokens)\n .merge(allBuiltInCalls)\n .merge(allGraphTokens)\n .merge(allSymbols)\n .moveBefore(datatype, dataClause)\n .moveAfter(avg, a)\n .moveBefore(a, graphAll)\n .moveAfter(groupConcat, groupByGroup);\n"]}
|
package/lib/lexer/terminals.d.ts
CHANGED
|
@@ -1,38 +1,4 @@
|
|
|
1
1
|
import { LexerBuilder } from '@traqula/core';
|
|
2
|
-
export declare const pnCharsBasePattern: RegExp;
|
|
3
|
-
export declare const pnCharsUPattern: RegExp;
|
|
4
|
-
export declare const varNamePattern: RegExp;
|
|
5
|
-
export declare const iriRefPattern: RegExp;
|
|
6
|
-
export declare const pnCharsPattern: RegExp;
|
|
7
|
-
export declare const pnPrefixPattern: RegExp;
|
|
8
|
-
export declare const pNameNsPattern: RegExp;
|
|
9
|
-
export declare const percentPattern: RegExp;
|
|
10
|
-
export declare const pnLocalEscPattern: RegExp;
|
|
11
|
-
export declare const plxPattern: RegExp;
|
|
12
|
-
export declare const pnLocalPattern: RegExp;
|
|
13
|
-
export declare const pNameLnPattern: RegExp;
|
|
14
|
-
export declare const blankNodeLabelPattern: RegExp;
|
|
15
|
-
export declare const var1Pattern: RegExp;
|
|
16
|
-
export declare const var2Pattern: RegExp;
|
|
17
|
-
export declare const langTagPattern: RegExp;
|
|
18
|
-
export declare const integerPattern: RegExp;
|
|
19
|
-
export declare const decimalPattern: RegExp;
|
|
20
|
-
export declare const exponentPattern: RegExp;
|
|
21
|
-
export declare const doublePattern: RegExp;
|
|
22
|
-
export declare const interferePositivePattern: RegExp;
|
|
23
|
-
export declare const decimalPositivePattern: RegExp;
|
|
24
|
-
export declare const doublePositivePattern: RegExp;
|
|
25
|
-
export declare const integerNegativePattern: RegExp;
|
|
26
|
-
export declare const decimalNegativePattern: RegExp;
|
|
27
|
-
export declare const doubleNegativePattern: RegExp;
|
|
28
|
-
export declare const echarPattern: RegExp;
|
|
29
|
-
export declare const stringLiteral1Pattern: RegExp;
|
|
30
|
-
export declare const stringLiteral2Pattern: RegExp;
|
|
31
|
-
export declare const stringLiteralLong1Pattern: RegExp;
|
|
32
|
-
export declare const stringLiteralLong2Pattern: RegExp;
|
|
33
|
-
export declare const wsPattern: RegExp;
|
|
34
|
-
export declare const nilPattern: RegExp;
|
|
35
|
-
export declare const anonPattern: RegExp;
|
|
36
2
|
export declare const iriRef: import("@traqula/core").NamedToken<"IriRef">;
|
|
37
3
|
export declare const pNameLn: import("@traqula/core").NamedToken<"PNameLn">;
|
|
38
4
|
export declare const pNameNs: import("@traqula/core").NamedToken<"PNameNs">;
|
package/lib/lexer/terminals.js
CHANGED
|
@@ -1,42 +1,40 @@
|
|
|
1
|
-
/* eslint-disable require-unicode-regexp,no-misleading-character-class,max-len */
|
|
1
|
+
/* eslint-disable require-unicode-regexp,no-misleading-character-class,max-len,no-control-regex */
|
|
2
2
|
import { LexerBuilder, createToken } from '@traqula/core';
|
|
3
3
|
import { Lexer } from 'chevrotain';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
export const nilPattern = new RegExp(`\\((${wsPattern.source})*\\)`);
|
|
39
|
-
export const anonPattern = new RegExp(`\\[(${wsPattern.source})*\\]`);
|
|
4
|
+
const pnCharsBasePattern = /[A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF]/;
|
|
5
|
+
const pnCharsUPattern = new RegExp(`${pnCharsBasePattern.source}|_`);
|
|
6
|
+
const varNamePattern = new RegExp(`((${pnCharsUPattern.source})|[0-9])((${pnCharsUPattern.source})|[0-9]|[\u00B7\u0300-\u036F\u203F-\u2040])*`);
|
|
7
|
+
const iriRefPattern = /<([^\u0000-\u0020"<>\\^`{|}])*>/;
|
|
8
|
+
const pnCharsPattern = new RegExp(`(${pnCharsUPattern.source})|[\\-0-9\u00B7\u0300-\u036F\u203F-\u2040]`);
|
|
9
|
+
const pnPrefixPattern = new RegExp(`(${pnCharsBasePattern.source})(((${pnCharsPattern.source})|\\.)*(${pnCharsPattern.source}))?`);
|
|
10
|
+
const pNameNsPattern = new RegExp(`(${pnPrefixPattern.source})?:`);
|
|
11
|
+
const percentPattern = /%[\dA-Fa-f]{2}/;
|
|
12
|
+
const pnLocalEscPattern = /\\[!#$%&'()*+,./;=?@\\_~-]/;
|
|
13
|
+
const plxPattern = new RegExp(`(${percentPattern.source})|(${pnLocalEscPattern.source})`);
|
|
14
|
+
const pnLocalPattern = new RegExp(`((${pnCharsUPattern.source})|:|[0-9]|(${plxPattern.source}))(((${pnCharsPattern.source})|\\.|:|(${plxPattern.source}))*((${pnCharsPattern.source})|:|(${plxPattern.source})))?`);
|
|
15
|
+
const pNameLnPattern = new RegExp(`(${pNameNsPattern.source})(${pnLocalPattern.source})`);
|
|
16
|
+
const blankNodeLabelPattern = new RegExp(`_:((${pnCharsUPattern.source})|[0-9])(((${pnCharsPattern.source})|\\.)*(${pnCharsPattern.source}))?`);
|
|
17
|
+
const var1Pattern = new RegExp(`\\?(${varNamePattern.source})`);
|
|
18
|
+
const var2Pattern = new RegExp(`\\$(${varNamePattern.source})`);
|
|
19
|
+
const langTagPattern = /@[A-Za-z]+(-[\dA-Za-z]+)*/;
|
|
20
|
+
const integerPattern = /\d+/;
|
|
21
|
+
const decimalPattern = /\d+\.\d+/;
|
|
22
|
+
const exponentPattern = /[Ee][+-]?\d+/;
|
|
23
|
+
const doublePattern = new RegExp(`([0-9]+\\.[0-9]*(${exponentPattern.source}))|(\\.[0-9]+(${exponentPattern.source}))|([0-9]+(${exponentPattern.source}))`);
|
|
24
|
+
const interferePositivePattern = new RegExp(`\\+${integerPattern.source}`);
|
|
25
|
+
const decimalPositivePattern = new RegExp(`\\+${decimalPattern.source}`);
|
|
26
|
+
const doublePositivePattern = new RegExp(`\\+${doublePattern.source}`);
|
|
27
|
+
const integerNegativePattern = new RegExp(`-${integerPattern.source}`);
|
|
28
|
+
const decimalNegativePattern = new RegExp(`-${decimalPattern.source}`);
|
|
29
|
+
const doubleNegativePattern = new RegExp(`-${doublePattern.source}`);
|
|
30
|
+
const echarPattern = /\\[\\"'bfnrt]/u;
|
|
31
|
+
const stringLiteral1Pattern = new RegExp(`'(([^\\u0027\\u005C\\u000A\u000D])|(${echarPattern.source}))*'`);
|
|
32
|
+
const stringLiteral2Pattern = new RegExp(`"(([^\\u0022\\u005C\\u000A\\u000D])|(${echarPattern.source}))*"`);
|
|
33
|
+
const stringLiteralLong1Pattern = new RegExp(`'''(('|(''))?([^'\\\\]|(${echarPattern.source})))*'''`);
|
|
34
|
+
const stringLiteralLong2Pattern = new RegExp(`"""(("|(""))?([^"\\\\]|(${echarPattern.source})))*"""`);
|
|
35
|
+
const wsPattern = /[\u0009\u000A\u000D ]/;
|
|
36
|
+
const nilPattern = new RegExp(`\\((${wsPattern.source})*\\)`);
|
|
37
|
+
const anonPattern = new RegExp(`\\[(${wsPattern.source})*\\]`);
|
|
40
38
|
export const iriRef = createToken({ name: 'IriRef', pattern: iriRefPattern });
|
|
41
39
|
export const pNameLn = createToken({ name: 'PNameLn', pattern: pNameLnPattern });
|
|
42
40
|
export const pNameNs = createToken({ name: 'PNameNs', pattern: pNameNsPattern, longer_alt: [pNameLn] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"terminals.js","sourceRoot":"","sources":["terminals.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,MAAM,CAAC,MAAM,kBAAkB,GAAG,uLAAuL,CAAC;AAC1N,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,GAAG,kBAAkB,CAAC,MAAM,IAAI,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC,KAAK,eAAe,CAAC,MAAM,aAAa,eAAe,CAAC,MAAM,8CAA8C,CAAC,CAAC;AACvJ,4CAA4C;AAC5C,MAAM,CAAC,MAAM,aAAa,GAAG,iCAAiC,CAAC;AAC/D,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC,IAAI,eAAe,CAAC,MAAM,4CAA4C,CAAC,CAAC;AACjH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,IAAI,kBAAkB,CAAC,MAAM,OAAO,cAAc,CAAC,MAAM,WAAW,cAAc,CAAC,MAAM,KAAK,CAAC,CAAC;AAC1I,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC,IAAI,eAAe,CAAC,M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,oBAAoB,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC;AAClH,MAAM,CAAC,MAAM,EAAE,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;AACxF,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;AAClG,MAAM,CAAC,MAAM,GAAG,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;AAExE,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,GAAG,CACnD,MAAM,EACN,OAAO,EACP,OAAO,EACP,cAAc,EACd,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,MAAM,EACN,OAAO,EACP,OAAO,EACP,eAAe,EACf,eAAe,EACf,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,EAAE,EACF,OAAO,EACP,GAAG,EACH,IAAI,CACL,CAAC","sourcesContent":["/* eslint-disable require-unicode-regexp,no-misleading-character-class,max-len */\nimport { LexerBuilder, createToken } from '@traqula/core';\nimport { Lexer } from 'chevrotain';\n\nexport const pnCharsBasePattern = /[A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF]/;\nexport const pnCharsUPattern = new RegExp(`${pnCharsBasePattern.source}|_`);\nexport const varNamePattern = new RegExp(`((${pnCharsUPattern.source})|[0-9])((${pnCharsUPattern.source})|[0-9]|[\\u00B7\\u0300-\\u036F\\u203F-\\u2040])*`);\n// eslint-disable-next-line no-control-regex\nexport const iriRefPattern = /<([^\\u0000-\\u0020\"<>\\\\^`{|}])*>/;\nexport const pnCharsPattern = new RegExp(`(${pnCharsUPattern.source})|[\\\\-0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]`);\nexport const pnPrefixPattern = new RegExp(`(${pnCharsBasePattern.source})(((${pnCharsPattern.source})|\\\\.)*(${pnCharsPattern.source}))?`);\nexport const pNameNsPattern = new RegExp(`(${pnPrefixPattern.source})?:`);\nexport const percentPattern = /%[\\dA-Fa-f]{2}/;\nexport const pnLocalEscPattern = /\\\\[!#$%&'()*+,./;=?@\\\\_~-]/;\nexport const plxPattern = new RegExp(`(${percentPattern.source})|(${pnLocalEscPattern.source})`);\nexport const pnLocalPattern = new RegExp(`((${pnCharsUPattern.source})|:|[0-9]|(${plxPattern.source}))(((${pnCharsPattern.source})|\\\\.|:|(${plxPattern.source}))*((${pnCharsPattern.source})|:|(${plxPattern.source})))?`);\nexport const pNameLnPattern = new RegExp(`(${pNameNsPattern.source})(${pnLocalPattern.source})`);\nexport const blankNodeLabelPattern = new RegExp(`_:((${pnCharsUPattern.source})|[0-9])(((${pnCharsPattern.source})|\\\\.)*(${pnCharsPattern.source}))?`);\nexport const var1Pattern = new RegExp(`\\\\?(${varNamePattern.source})`);\nexport const var2Pattern = new RegExp(`\\\\$(${varNamePattern.source})`);\nexport const langTagPattern = /@[A-Za-z]+(-[\\dA-Za-z]+)*/;\nexport const integerPattern = /\\d+/;\nexport const decimalPattern = /\\d+\\.\\d+/;\nexport const exponentPattern = /[Ee][+-]?\\d+/;\nexport const doublePattern = new RegExp(`([0-9]+\\\\.[0-9]*(${exponentPattern.source}))|(\\\\.[0-9]+(${exponentPattern.source}))|([0-9]+(${exponentPattern.source}))`);\nexport const interferePositivePattern = new RegExp(`\\\\+${integerPattern.source}`);\nexport const decimalPositivePattern = new RegExp(`\\\\+${decimalPattern.source}`);\nexport const doublePositivePattern = new RegExp(`\\\\+${doublePattern.source}`);\nexport const integerNegativePattern = new RegExp(`-${integerPattern.source}`);\nexport const decimalNegativePattern = new RegExp(`-${decimalPattern.source}`);\nexport const doubleNegativePattern = new RegExp(`-${doublePattern.source}`);\nexport const echarPattern = /\\\\[\\\\\"'bfnrt]/u;\nexport const stringLiteral1Pattern = new RegExp(`'(([^\\\\u0027\\\\u005C\\\\u000A\\u000D])|(${echarPattern.source}))*'`);\nexport const stringLiteral2Pattern = new RegExp(`\"(([^\\\\u0022\\\\u005C\\\\u000A\\\\u000D])|(${echarPattern.source}))*\"`);\nexport const stringLiteralLong1Pattern = new RegExp(`'''(('|(''))?([^'\\\\\\\\]|(${echarPattern.source})))*'''`);\nexport const stringLiteralLong2Pattern = new RegExp(`\"\"\"((\"|(\"\"))?([^\"\\\\\\\\]|(${echarPattern.source})))*\"\"\"`);\n// eslint-disable-next-line no-control-regex\nexport const wsPattern = /[\\u0009\\u000A\\u000D ]/;\nexport const nilPattern = new RegExp(`\\\\((${wsPattern.source})*\\\\)`);\nexport const anonPattern = new RegExp(`\\\\[(${wsPattern.source})*\\\\]`);\n\nexport const iriRef = createToken({ name: 'IriRef', pattern: iriRefPattern });\nexport const pNameLn = createToken({ name: 'PNameLn', pattern: pNameLnPattern });\nexport const pNameNs = createToken({ name: 'PNameNs', pattern: pNameNsPattern, longer_alt: [ pNameLn ]});\nexport const blankNodeLabel = createToken({ name: 'BlankNodeLabel', pattern: blankNodeLabelPattern });\nexport const var1 = createToken({ name: 'Var1', pattern: var1Pattern });\nexport const var2 = createToken({ name: 'Var2', pattern: var2Pattern });\nexport const langTag = createToken({ name: 'LangTag', pattern: langTagPattern });\nexport const integer = createToken({ name: 'Integer', pattern: integerPattern });\nexport const decimal = createToken({ name: 'Decimal', pattern: decimalPattern });\nexport const double = createToken({ name: 'Double', pattern: doublePattern });\nexport const integerPositive = createToken({ name: 'InterferePositive', pattern: interferePositivePattern });\nexport const decimalPositive = createToken({ name: 'DecimalPositive', pattern: decimalPositivePattern });\nexport const doublePositive = createToken({ name: 'DoublePositive', pattern: doublePositivePattern });\nexport const integerNegative = createToken({ name: 'IntegerNegative', pattern: integerNegativePattern });\nexport const decimalNegative = createToken({ name: 'DecimalNegative', pattern: decimalNegativePattern });\nexport const doubleNegative = createToken({ name: 'DoubleNegative', pattern: doubleNegativePattern });\nexport const stringLiteral1 = createToken({ name: 'StringLiteral1', pattern: stringLiteral1Pattern });\nexport const stringLiteral2 = createToken({ name: 'StringLiteral2', pattern: stringLiteral2Pattern });\nexport const stringLiteralLong1 = createToken({ name: 'StringLiteralLong1', pattern: stringLiteralLong1Pattern });\nexport const stringLiteralLong2 = createToken({ name: 'StringLiteralLong2', pattern: stringLiteralLong2Pattern });\nexport const ws = createToken({ name: 'Ws', pattern: wsPattern, group: Lexer.SKIPPED });\nexport const comment = createToken({ name: 'Comment', pattern: /#[^\\n]*/, group: Lexer.SKIPPED });\nexport const nil = createToken({ name: 'Nil', pattern: nilPattern });\nexport const anon = createToken({ name: 'Anon', pattern: anonPattern });\n\nexport const allTerminals = LexerBuilder.create().add(\n iriRef,\n pNameNs,\n pNameLn,\n blankNodeLabel,\n var1,\n var2,\n langTag,\n double,\n decimal,\n integer,\n integerPositive,\n decimalPositive,\n doublePositive,\n integerNegative,\n decimalNegative,\n doubleNegative,\n stringLiteralLong1,\n stringLiteralLong2,\n stringLiteral1,\n stringLiteral2,\n ws,\n comment,\n nil,\n anon,\n);\n"]}
|
|
1
|
+
{"version":3,"file":"terminals.js","sourceRoot":"","sources":["terminals.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1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-misleading-character-class,max-len,no-control-regex */\nimport { LexerBuilder, createToken } from '@traqula/core';\nimport { Lexer } from 'chevrotain';\n\nconst pnCharsBasePattern = /[A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF]/;\nconst pnCharsUPattern = new RegExp(`${pnCharsBasePattern.source}|_`);\nconst varNamePattern = new RegExp(`((${pnCharsUPattern.source})|[0-9])((${pnCharsUPattern.source})|[0-9]|[\\u00B7\\u0300-\\u036F\\u203F-\\u2040])*`);\nconst iriRefPattern = /<([^\\u0000-\\u0020\"<>\\\\^`{|}])*>/;\nconst pnCharsPattern = new RegExp(`(${pnCharsUPattern.source})|[\\\\-0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]`);\nconst pnPrefixPattern = new RegExp(`(${pnCharsBasePattern.source})(((${pnCharsPattern.source})|\\\\.)*(${pnCharsPattern.source}))?`);\nconst pNameNsPattern = new RegExp(`(${pnPrefixPattern.source})?:`);\nconst percentPattern = /%[\\dA-Fa-f]{2}/;\nconst pnLocalEscPattern = /\\\\[!#$%&'()*+,./;=?@\\\\_~-]/;\nconst plxPattern = new RegExp(`(${percentPattern.source})|(${pnLocalEscPattern.source})`);\nconst pnLocalPattern = new RegExp(`((${pnCharsUPattern.source})|:|[0-9]|(${plxPattern.source}))(((${pnCharsPattern.source})|\\\\.|:|(${plxPattern.source}))*((${pnCharsPattern.source})|:|(${plxPattern.source})))?`);\nconst pNameLnPattern = new RegExp(`(${pNameNsPattern.source})(${pnLocalPattern.source})`);\nconst blankNodeLabelPattern = new RegExp(`_:((${pnCharsUPattern.source})|[0-9])(((${pnCharsPattern.source})|\\\\.)*(${pnCharsPattern.source}))?`);\nconst var1Pattern = new RegExp(`\\\\?(${varNamePattern.source})`);\nconst var2Pattern = new RegExp(`\\\\$(${varNamePattern.source})`);\nconst langTagPattern = /@[A-Za-z]+(-[\\dA-Za-z]+)*/;\nconst integerPattern = /\\d+/;\nconst decimalPattern = /\\d+\\.\\d+/;\nconst exponentPattern = /[Ee][+-]?\\d+/;\nconst doublePattern = new RegExp(`([0-9]+\\\\.[0-9]*(${exponentPattern.source}))|(\\\\.[0-9]+(${exponentPattern.source}))|([0-9]+(${exponentPattern.source}))`);\nconst interferePositivePattern = new RegExp(`\\\\+${integerPattern.source}`);\nconst decimalPositivePattern = new RegExp(`\\\\+${decimalPattern.source}`);\nconst doublePositivePattern = new RegExp(`\\\\+${doublePattern.source}`);\nconst integerNegativePattern = new RegExp(`-${integerPattern.source}`);\nconst decimalNegativePattern = new RegExp(`-${decimalPattern.source}`);\nconst doubleNegativePattern = new RegExp(`-${doublePattern.source}`);\nconst echarPattern = /\\\\[\\\\\"'bfnrt]/u;\nconst stringLiteral1Pattern = new RegExp(`'(([^\\\\u0027\\\\u005C\\\\u000A\\u000D])|(${echarPattern.source}))*'`);\nconst stringLiteral2Pattern = new RegExp(`\"(([^\\\\u0022\\\\u005C\\\\u000A\\\\u000D])|(${echarPattern.source}))*\"`);\nconst stringLiteralLong1Pattern = new RegExp(`'''(('|(''))?([^'\\\\\\\\]|(${echarPattern.source})))*'''`);\nconst stringLiteralLong2Pattern = new RegExp(`\"\"\"((\"|(\"\"))?([^\"\\\\\\\\]|(${echarPattern.source})))*\"\"\"`);\nconst wsPattern = /[\\u0009\\u000A\\u000D ]/;\nconst nilPattern = new RegExp(`\\\\((${wsPattern.source})*\\\\)`);\nconst anonPattern = new RegExp(`\\\\[(${wsPattern.source})*\\\\]`);\n\nexport const iriRef = createToken({ name: 'IriRef', pattern: iriRefPattern });\nexport const pNameLn = createToken({ name: 'PNameLn', pattern: pNameLnPattern });\nexport const pNameNs = createToken({ name: 'PNameNs', pattern: pNameNsPattern, longer_alt: [ pNameLn ]});\nexport const blankNodeLabel = createToken({ name: 'BlankNodeLabel', pattern: blankNodeLabelPattern });\nexport const var1 = createToken({ name: 'Var1', pattern: var1Pattern });\nexport const var2 = createToken({ name: 'Var2', pattern: var2Pattern });\nexport const langTag = createToken({ name: 'LangTag', pattern: langTagPattern });\nexport const integer = createToken({ name: 'Integer', pattern: integerPattern });\nexport const decimal = createToken({ name: 'Decimal', pattern: decimalPattern });\nexport const double = createToken({ name: 'Double', pattern: doublePattern });\nexport const integerPositive = createToken({ name: 'InterferePositive', pattern: interferePositivePattern });\nexport const decimalPositive = createToken({ name: 'DecimalPositive', pattern: decimalPositivePattern });\nexport const doublePositive = createToken({ name: 'DoublePositive', pattern: doublePositivePattern });\nexport const integerNegative = createToken({ name: 'IntegerNegative', pattern: integerNegativePattern });\nexport const decimalNegative = createToken({ name: 'DecimalNegative', pattern: decimalNegativePattern });\nexport const doubleNegative = createToken({ name: 'DoubleNegative', pattern: doubleNegativePattern });\nexport const stringLiteral1 = createToken({ name: 'StringLiteral1', pattern: stringLiteral1Pattern });\nexport const stringLiteral2 = createToken({ name: 'StringLiteral2', pattern: stringLiteral2Pattern });\nexport const stringLiteralLong1 = createToken({ name: 'StringLiteralLong1', pattern: stringLiteralLong1Pattern });\nexport const stringLiteralLong2 = createToken({ name: 'StringLiteralLong2', pattern: stringLiteralLong2Pattern });\nexport const ws = createToken({ name: 'Ws', pattern: wsPattern, group: Lexer.SKIPPED });\nexport const comment = createToken({ name: 'Comment', pattern: /#[^\\n]*/, group: Lexer.SKIPPED });\nexport const nil = createToken({ name: 'Nil', pattern: nilPattern });\nexport const anon = createToken({ name: 'Anon', pattern: anonPattern });\n\nexport const allTerminals = LexerBuilder.create().add(\n iriRef,\n pNameNs,\n pNameLn,\n blankNodeLabel,\n var1,\n var2,\n langTag,\n double,\n decimal,\n integer,\n integerPositive,\n decimalPositive,\n doublePositive,\n integerNegative,\n decimalNegative,\n doubleNegative,\n stringLiteralLong1,\n stringLiteralLong2,\n stringLiteral1,\n stringLiteral2,\n ws,\n comment,\n nil,\n anon,\n);\n"]}
|
package/lib/utils.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import type { GroupPattern, Pattern, PropertyPath, Term, VariableTerm } from './Sparql11types';
|
|
2
|
-
export declare function deGroupSingle(group: GroupPattern): Pattern;
|
|
3
|
-
export declare function isVariable(term: Term | PropertyPath): term is VariableTerm;
|
|
4
1
|
/**
|
|
5
2
|
* Transform input in accordance to [19.2](https://www.w3.org/TR/sparql11-query/#codepointEscape)
|
|
6
3
|
* and validate unicode codepoints.
|
package/lib/utils.js
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
export function deGroupSingle(group) {
|
|
2
|
-
return group.patterns.length === 1 ? group.patterns[0] : group;
|
|
3
|
-
}
|
|
4
|
-
export function isVariable(term) {
|
|
5
|
-
return 'termType' in term && term.termType === 'Variable';
|
|
6
|
-
}
|
|
7
1
|
/**
|
|
8
2
|
* Transform input in accordance to [19.2](https://www.w3.org/TR/sparql11-query/#codepointEscape)
|
|
9
3
|
* and validate unicode codepoints.
|
package/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAa;IACjD,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CACrC,2CAA2C,EAC3C,CAAC,CAAC,EAAE,QAAgB,EAAE,QAAgB,EAAE,EAAE;QACxC,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YAC/C,OAAO,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC/C,IAAI,QAAQ,GAAG,MAAM,EAAE,CAAC;YACtB,OAAO,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;QACxC,CAAC;QACD,MAAM,mBAAmB,GAAG,QAAQ,GAAG,OAAO,CAAC;QAC/C,OAAO,MAAM,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,mBAAmB,IAAI,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,mBAAmB,GAAG,KAAK,CAAC,CAAC,CAAC;IAC5G,CAAC,CACF,CAAC;IACF,2CAA2C;IAC3C,IAAI,wCAAwC,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC;QAClE,MAAM,IAAI,KAAK,CAAC,6EAA6E,CAAC,CAAC;IACjG,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["/**\n * Transform input in accordance to [19.2](https://www.w3.org/TR/sparql11-query/#codepointEscape)\n * and validate unicode codepoints.\n */\nexport function sparqlCodepointEscape(input: string): string {\n const sanitizedInput = input.replaceAll(\n /\\\\u([0-9a-fA-F]{4})|\\\\U([0-9a-fA-F]{8})/gu,\n (_, unicode4: string, unicode8: string) => {\n if (unicode4) {\n const charCode = Number.parseInt(unicode4, 16);\n return String.fromCodePoint(charCode);\n }\n const charCode = Number.parseInt(unicode8, 16);\n if (charCode < 0xFFFF) {\n return String.fromCodePoint(charCode);\n }\n const substractedCharCode = charCode - 0x10000;\n return String.fromCodePoint(0xD800 + (substractedCharCode >> 10), 0xDC00 + (substractedCharCode & 0x3FF));\n },\n );\n // Test for invalid unicode surrogate pairs\n if (/[\\uD800-\\uDBFF](?:[^\\uDC00-\\uDFFF]|$)/u.test(sanitizedInput)) {\n throw new Error(`Invalid unicode codepoint of surrogate pair without corresponding codepoint`);\n }\n return sanitizedInput;\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Wildcard, Pattern, QuerySelect, Update, TripleCollection, Path, TripleNesting, Term, SparqlQuery } from '../RoundTripTypes';
|
|
2
|
+
export declare function queryIsGood(query: Pick<QuerySelect, 'variables' | 'solutionModifiers' | 'where'>): void;
|
|
3
|
+
export declare function findPatternBoundedVars(iter: SparqlQuery | Pattern | TripleNesting | TripleCollection | Path | Term | Wildcard, boundedVars: Set<string>): void;
|
|
4
|
+
/**
|
|
5
|
+
* NOTE 13 and https://www.w3.org/TR/sparql11-query/#variableScope
|
|
6
|
+
* > In BIND (expr AS v) requires that the variable v is not in-scope from the preceeding elements in the
|
|
7
|
+
* group graph pattern in which it is used.
|
|
8
|
+
*/
|
|
9
|
+
export declare function checkNote13(patterns: Pattern[]): void;
|
|
10
|
+
/**
|
|
11
|
+
* https://www.w3.org/TR/sparql11-query/#grammarBNodes
|
|
12
|
+
* > two INSERT DATA operations within a single SPARQL Update request
|
|
13
|
+
*/
|
|
14
|
+
export declare function updateNoReuseBlankNodeLabels(updateQuery: Update): void;
|