@traqula/parser-sparql-1-1 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.
@@ -0,0 +1,51 @@
1
+ import { ParserBuilder } from '@traqula/core';
2
+ import { gram } from '@traqula/rules-sparql-1-1';
3
+ const rulesNoBuiltIn = [
4
+ gram.expression,
5
+ gram.conditionalOrExpression,
6
+ gram.conditionalAndExpression,
7
+ gram.valueLogical,
8
+ gram.relationalExpression,
9
+ gram.numericExpression,
10
+ gram.expressionList,
11
+ gram.additiveExpression,
12
+ gram.multiplicativeExpression,
13
+ gram.unaryExpression,
14
+ gram.primaryExpression,
15
+ gram.brackettedExpression,
16
+ // BuiltInCall,
17
+ gram.iriOrFunction,
18
+ gram.rdfLiteral,
19
+ gram.numericLiteral,
20
+ gram.numericLiteralUnsigned,
21
+ gram.numericLiteralPositive,
22
+ gram.numericLiteralNegative,
23
+ gram.booleanLiteral,
24
+ gram.var_,
25
+ gram.builtInStr,
26
+ gram.builtInLang,
27
+ gram.builtInLangmatches,
28
+ gram.builtInDatatype,
29
+ gram.builtInBound,
30
+ gram.builtInIri,
31
+ gram.builtInUri,
32
+ gram.builtInBnodeSparqlJs,
33
+ gram.builtInRand,
34
+ gram.builtInAbs,
35
+ gram.builtInCeil,
36
+ gram.builtInFloor,
37
+ gram.builtInRound,
38
+ gram.builtInConcat,
39
+ gram.builtInStrlen,
40
+ gram.builtInUcase,
41
+ gram.builtInLcase,
42
+ gram.builtInEncode_for_uri,
43
+ ];
44
+ const builtInPatch = {
45
+ name: 'builtInCall',
46
+ impl: ({ OR, SUBRULE }) => () => OR(gram.builtInCallList(SUBRULE).slice(0, -2)),
47
+ };
48
+ export const expressionParserBuilder = ParserBuilder.create(rulesNoBuiltIn)
49
+ .addMany(gram.builtInContains, gram.builtInStrstarts, gram.builtInStrends, gram.builtInStrbefore, gram.builtInStrafter, gram.builtInYear, gram.builtInMonth, gram.builtInDay, gram.builtInHours, gram.builtInMinutes, gram.builtInSeconds, gram.builtInTimezone, gram.builtInTz, gram.builtInNow, gram.builtInUuid, gram.builtInStruuid, gram.builtInMd5, gram.builtInSha1, gram.builtInSha256, gram.builtInSha384, gram.builtInSha512, gram.builtInCoalesce, gram.builtInIf, gram.builtInStrlang, gram.builtInStrdt, gram.builtInSameterm, gram.builtInIsiri, gram.builtInIsuri, gram.builtInIsblank, gram.builtInIsliteral, gram.builtInIsnumeric, gram.regexExpression, gram.substringExpression, gram.strReplaceExpression, gram.aggregateCount, gram.aggregateSum, gram.aggregateMin, gram.aggregateMax, gram.aggregateAvg, gram.aggregateSample, gram.aggregateGroup_concat, gram.aggregate, gram.iri, gram.prefixedName, gram.argList, gram.string)
50
+ .addRule(builtInPatch);
51
+ //# sourceMappingURL=expressionParser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expressionParser.js","sourceRoot":"","sources":["expressionParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AAEjD,MAAM,cAAc,GAAW;IAC7B,IAAI,CAAC,UAAU;IACf,IAAI,CAAC,uBAAuB;IAC5B,IAAI,CAAC,wBAAwB;IAC7B,IAAI,CAAC,YAAY;IACjB,IAAI,CAAC,oBAAoB;IACzB,IAAI,CAAC,iBAAiB;IACtB,IAAI,CAAC,cAAc;IACnB,IAAI,CAAC,kBAAkB;IACvB,IAAI,CAAC,wBAAwB;IAC7B,IAAI,CAAC,eAAe;IACpB,IAAI,CAAC,iBAAiB;IACtB,IAAI,CAAC,oBAAoB;IACzB,eAAe;IACf,IAAI,CAAC,aAAa;IAClB,IAAI,CAAC,UAAU;IACf,IAAI,CAAC,cAAc;IACnB,IAAI,CAAC,sBAAsB;IAC3B,IAAI,CAAC,sBAAsB;IAC3B,IAAI,CAAC,sBAAsB;IAC3B,IAAI,CAAC,cAAc;IACnB,IAAI,CAAC,IAA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AI,CAAC,aAAa,EAClB,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,gBAAgB,EACrB,IAAI,CAAC,gBAAgB,EACrB,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,mBAAmB,EACxB,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,qBAAqB,EAC1B,IAAI,CAAC,SAAS,EACd,IAAI,CAAC,GAAG,EACR,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,MAAM,CACZ;KACA,OAAO,CAAC,YAAY,CAAC,CAAC","sourcesContent":["import { ParserBuilder } from '@traqula/core';\nimport { gram } from '@traqula/rules-sparql-1-1';\n\nconst rulesNoBuiltIn = <const> [\n gram.expression,\n gram.conditionalOrExpression,\n gram.conditionalAndExpression,\n gram.valueLogical,\n gram.relationalExpression,\n gram.numericExpression,\n gram.expressionList,\n gram.additiveExpression,\n gram.multiplicativeExpression,\n gram.unaryExpression,\n gram.primaryExpression,\n gram.brackettedExpression,\n // BuiltInCall,\n gram.iriOrFunction,\n gram.rdfLiteral,\n gram.numericLiteral,\n gram.numericLiteralUnsigned,\n gram.numericLiteralPositive,\n gram.numericLiteralNegative,\n gram.booleanLiteral,\n gram.var_,\n gram.builtInStr,\n gram.builtInLang,\n gram.builtInLangmatches,\n gram.builtInDatatype,\n gram.builtInBound,\n gram.builtInIri,\n gram.builtInUri,\n gram.builtInBnodeSparqlJs,\n gram.builtInRand,\n gram.builtInAbs,\n gram.builtInCeil,\n gram.builtInFloor,\n gram.builtInRound,\n gram.builtInConcat,\n gram.builtInStrlen,\n gram.builtInUcase,\n gram.builtInLcase,\n gram.builtInEncode_for_uri,\n];\n\nconst builtInPatch: typeof gram.builtInCall = {\n name: 'builtInCall',\n impl: ({ OR, SUBRULE }) => () => OR(gram.builtInCallList(SUBRULE).slice(0, -2)),\n};\n\nexport const expressionParserBuilder = ParserBuilder.create(rulesNoBuiltIn)\n .addMany(\n gram.builtInContains,\n gram.builtInStrstarts,\n gram.builtInStrends,\n gram.builtInStrbefore,\n gram.builtInStrafter,\n gram.builtInYear,\n gram.builtInMonth,\n gram.builtInDay,\n gram.builtInHours,\n gram.builtInMinutes,\n gram.builtInSeconds,\n gram.builtInTimezone,\n gram.builtInTz,\n gram.builtInNow,\n gram.builtInUuid,\n gram.builtInStruuid,\n gram.builtInMd5,\n gram.builtInSha1,\n gram.builtInSha256,\n gram.builtInSha384,\n gram.builtInSha512,\n gram.builtInCoalesce,\n gram.builtInIf,\n gram.builtInStrlang,\n gram.builtInStrdt,\n gram.builtInSameterm,\n gram.builtInIsiri,\n gram.builtInIsuri,\n gram.builtInIsblank,\n gram.builtInIsliteral,\n gram.builtInIsnumeric,\n gram.regexExpression,\n gram.substringExpression,\n gram.strReplaceExpression,\n gram.aggregateCount,\n gram.aggregateSum,\n gram.aggregateMin,\n gram.aggregateMax,\n gram.aggregateAvg,\n gram.aggregateSample,\n gram.aggregateGroup_concat,\n gram.aggregate,\n gram.iri,\n gram.prefixedName,\n gram.argList,\n gram.string,\n )\n .addRule(builtInPatch);\n"]}