@traqula/rules-sparql-1-1 0.0.1-alpha.137
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/LICENSE.txt +22 -0
- package/README.md +15 -0
- package/lib/Sparql11types.d.ts +246 -0
- package/lib/Sparql11types.js +2 -0
- package/lib/Sparql11types.js.map +1 -0
- package/lib/expressionHelpers.d.ts +55 -0
- package/lib/expressionHelpers.js +224 -0
- package/lib/expressionHelpers.js.map +1 -0
- package/lib/grammar/builtIn.d.ts +91 -0
- package/lib/grammar/builtIn.js +239 -0
- package/lib/grammar/builtIn.js.map +1 -0
- package/lib/grammar/dataSetClause.d.ts +22 -0
- package/lib/grammar/dataSetClause.js +37 -0
- package/lib/grammar/dataSetClause.js.map +1 -0
- package/lib/grammar/expression.d.ts +68 -0
- package/lib/grammar/expression.js +397 -0
- package/lib/grammar/expression.js.map +1 -0
- package/lib/grammar/general.d.ts +42 -0
- package/lib/grammar/general.js +161 -0
- package/lib/grammar/general.js.map +1 -0
- package/lib/grammar/index.d.ts +12 -0
- package/lib/grammar/index.js +13 -0
- package/lib/grammar/index.js.map +1 -0
- package/lib/grammar/literals.d.ts +53 -0
- package/lib/grammar/literals.js +179 -0
- package/lib/grammar/literals.js.map +1 -0
- package/lib/grammar/propertyPaths.d.ts +40 -0
- package/lib/grammar/propertyPaths.js +193 -0
- package/lib/grammar/propertyPaths.js.map +1 -0
- package/lib/grammar/queryUnit/queryUnit.d.ts +53 -0
- package/lib/grammar/queryUnit/queryUnit.js +405 -0
- package/lib/grammar/queryUnit/queryUnit.js.map +1 -0
- package/lib/grammar/solutionModifier.d.ts +44 -0
- package/lib/grammar/solutionModifier.js +203 -0
- package/lib/grammar/solutionModifier.js.map +1 -0
- package/lib/grammar/tripleBlock.d.ts +42 -0
- package/lib/grammar/tripleBlock.js +309 -0
- package/lib/grammar/tripleBlock.js.map +1 -0
- package/lib/grammar/updateUnit/updateUnit.d.ts +101 -0
- package/lib/grammar/updateUnit/updateUnit.js +448 -0
- package/lib/grammar/updateUnit/updateUnit.js.map +1 -0
- package/lib/grammar/whereClause.d.ts +76 -0
- package/lib/grammar/whereClause.js +383 -0
- package/lib/grammar/whereClause.js.map +1 -0
- package/lib/index.cjs +13088 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +6 -0
- package/lib/index.js.map +1 -0
- package/lib/lexer/BuildinCalls.d.ts +248 -0
- package/lib/lexer/BuildinCalls.js +189 -0
- package/lib/lexer/BuildinCalls.js.map +1 -0
- package/lib/lexer/graph.d.ts +14 -0
- package/lib/lexer/graph.js +9 -0
- package/lib/lexer/graph.js.map +1 -0
- package/lib/lexer/index.d.ts +5 -0
- package/lib/lexer/index.js +6 -0
- package/lib/lexer/index.js.map +1 -0
- package/lib/lexer/lexer.d.ts +147 -0
- package/lib/lexer/lexer.js +67 -0
- package/lib/lexer/lexer.js.map +1 -0
- package/lib/lexer/symbols.d.ts +80 -0
- package/lib/lexer/symbols.js +30 -0
- package/lib/lexer/symbols.js.map +1 -0
- package/lib/lexer/terminals.d.ts +108 -0
- package/lib/lexer/terminals.js +76 -0
- package/lib/lexer/terminals.js.map +1 -0
- package/lib/utils.d.ts +3 -0
- package/lib/utils.js +7 -0
- package/lib/utils.js.map +1 -0
- package/package.json +45 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { LexerBuilder } from '@traqula/core';
|
|
2
|
+
export declare const baseDecl: import("chevrotain").TokenType & {
|
|
3
|
+
name: "BaseDecl";
|
|
4
|
+
};
|
|
5
|
+
export declare const prefixDecl: import("chevrotain").TokenType & {
|
|
6
|
+
name: "PrefixDecl";
|
|
7
|
+
};
|
|
8
|
+
export declare const select: import("chevrotain").TokenType & {
|
|
9
|
+
name: "Select";
|
|
10
|
+
};
|
|
11
|
+
export declare const distinct: import("chevrotain").TokenType & {
|
|
12
|
+
name: "Distinct";
|
|
13
|
+
};
|
|
14
|
+
export declare const reduced: import("chevrotain").TokenType & {
|
|
15
|
+
name: "Reduced";
|
|
16
|
+
};
|
|
17
|
+
export declare const as: import("chevrotain").TokenType & {
|
|
18
|
+
name: "As";
|
|
19
|
+
};
|
|
20
|
+
export declare const construct: import("chevrotain").TokenType & {
|
|
21
|
+
name: "Construct";
|
|
22
|
+
};
|
|
23
|
+
export declare const describe: import("chevrotain").TokenType & {
|
|
24
|
+
name: "Describe";
|
|
25
|
+
};
|
|
26
|
+
export declare const ask: import("chevrotain").TokenType & {
|
|
27
|
+
name: "Ask";
|
|
28
|
+
};
|
|
29
|
+
export declare const from: import("chevrotain").TokenType & {
|
|
30
|
+
name: "From";
|
|
31
|
+
};
|
|
32
|
+
export declare const where: import("chevrotain").TokenType & {
|
|
33
|
+
name: "Where";
|
|
34
|
+
};
|
|
35
|
+
export declare const groupBy: import("chevrotain").TokenType & {
|
|
36
|
+
name: "GroupBy";
|
|
37
|
+
};
|
|
38
|
+
export declare const having: import("chevrotain").TokenType & {
|
|
39
|
+
name: "Having";
|
|
40
|
+
};
|
|
41
|
+
export declare const order: import("chevrotain").TokenType & {
|
|
42
|
+
name: "Order";
|
|
43
|
+
};
|
|
44
|
+
export declare const orderAsc: import("chevrotain").TokenType & {
|
|
45
|
+
name: "OrderAsc";
|
|
46
|
+
};
|
|
47
|
+
export declare const orderDesc: import("chevrotain").TokenType & {
|
|
48
|
+
name: "OrderDesc";
|
|
49
|
+
};
|
|
50
|
+
export declare const limit: import("chevrotain").TokenType & {
|
|
51
|
+
name: "Limit";
|
|
52
|
+
};
|
|
53
|
+
export declare const offset: import("chevrotain").TokenType & {
|
|
54
|
+
name: "Offset";
|
|
55
|
+
};
|
|
56
|
+
export declare const values: import("chevrotain").TokenType & {
|
|
57
|
+
name: "Values";
|
|
58
|
+
};
|
|
59
|
+
export declare const load: import("chevrotain").TokenType & {
|
|
60
|
+
name: "Load";
|
|
61
|
+
};
|
|
62
|
+
export declare const silent: import("chevrotain").TokenType & {
|
|
63
|
+
name: "Silent";
|
|
64
|
+
};
|
|
65
|
+
export declare const loadInto: import("chevrotain").TokenType & {
|
|
66
|
+
name: "LoadInto";
|
|
67
|
+
};
|
|
68
|
+
export declare const clear: import("chevrotain").TokenType & {
|
|
69
|
+
name: "Clear";
|
|
70
|
+
};
|
|
71
|
+
export declare const drop: import("chevrotain").TokenType & {
|
|
72
|
+
name: "Drop";
|
|
73
|
+
};
|
|
74
|
+
export declare const create: import("chevrotain").TokenType & {
|
|
75
|
+
name: "Create";
|
|
76
|
+
};
|
|
77
|
+
export declare const add: import("chevrotain").TokenType & {
|
|
78
|
+
name: "Add";
|
|
79
|
+
};
|
|
80
|
+
export declare const to: import("chevrotain").TokenType & {
|
|
81
|
+
name: "To";
|
|
82
|
+
};
|
|
83
|
+
export declare const move: import("chevrotain").TokenType & {
|
|
84
|
+
name: "Move";
|
|
85
|
+
};
|
|
86
|
+
export declare const copy: import("chevrotain").TokenType & {
|
|
87
|
+
name: "Copy";
|
|
88
|
+
};
|
|
89
|
+
export declare const modifyWith: import("chevrotain").TokenType & {
|
|
90
|
+
name: "ModifyWith";
|
|
91
|
+
};
|
|
92
|
+
export declare const deleteClause: import("chevrotain").TokenType & {
|
|
93
|
+
name: "DeleteClause";
|
|
94
|
+
};
|
|
95
|
+
export declare const insertClause: import("chevrotain").TokenType & {
|
|
96
|
+
name: "InsertClause";
|
|
97
|
+
};
|
|
98
|
+
export declare const dataClause: import("chevrotain").TokenType & {
|
|
99
|
+
name: "DataClause";
|
|
100
|
+
};
|
|
101
|
+
export declare const usingClause: import("chevrotain").TokenType & {
|
|
102
|
+
name: "UsingClause";
|
|
103
|
+
};
|
|
104
|
+
export declare const optional: import("chevrotain").TokenType & {
|
|
105
|
+
name: "Optional";
|
|
106
|
+
};
|
|
107
|
+
export declare const service: import("chevrotain").TokenType & {
|
|
108
|
+
name: "Service";
|
|
109
|
+
};
|
|
110
|
+
export declare const bind: import("chevrotain").TokenType & {
|
|
111
|
+
name: "Bind";
|
|
112
|
+
};
|
|
113
|
+
export declare const undef: import("chevrotain").TokenType & {
|
|
114
|
+
name: "Undef";
|
|
115
|
+
};
|
|
116
|
+
export declare const minus: import("chevrotain").TokenType & {
|
|
117
|
+
name: "Minus";
|
|
118
|
+
};
|
|
119
|
+
export declare const union: import("chevrotain").TokenType & {
|
|
120
|
+
name: "Union";
|
|
121
|
+
};
|
|
122
|
+
export declare const filter: import("chevrotain").TokenType & {
|
|
123
|
+
name: "Filter";
|
|
124
|
+
};
|
|
125
|
+
export declare const a: import("chevrotain").TokenType & {
|
|
126
|
+
name: "a";
|
|
127
|
+
};
|
|
128
|
+
export declare const true_: import("chevrotain").TokenType & {
|
|
129
|
+
name: "True";
|
|
130
|
+
};
|
|
131
|
+
export declare const false_: import("chevrotain").TokenType & {
|
|
132
|
+
name: "False";
|
|
133
|
+
};
|
|
134
|
+
export declare const in_: import("chevrotain").TokenType & {
|
|
135
|
+
name: "In";
|
|
136
|
+
};
|
|
137
|
+
export declare const notIn: import("chevrotain").TokenType & {
|
|
138
|
+
name: "NotIn";
|
|
139
|
+
};
|
|
140
|
+
export declare const separator: import("chevrotain").TokenType & {
|
|
141
|
+
name: "Separator";
|
|
142
|
+
};
|
|
143
|
+
export declare const allBaseTokens: LexerBuilder<"" | "a" | "BaseDecl" | "PrefixDecl" | "Select" | "Distinct" | "Reduced" | "As" | "Construct" | "Describe" | "Ask" | "From" | "Where" | "GroupBy" | "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">;
|
|
144
|
+
/**
|
|
145
|
+
* [!!!ORDER MATTERS!!!](https://chevrotain.io/docs/tutorial/step1_lexing.html#creating-the-lexer)
|
|
146
|
+
*/
|
|
147
|
+
export declare const sparql11Tokens: LexerBuilder<"" | "a" | "DefaultGraph" | "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" | "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" | "GroupBy" | "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">;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* eslint-disable require-unicode-regexp */
|
|
2
|
+
import { LexerBuilder } from '@traqula/core';
|
|
3
|
+
import { createToken } from '@traqula/core';
|
|
4
|
+
import { allBuiltInCalls, avg, datatype } from './BuildinCalls';
|
|
5
|
+
import { allGraphTokens } from './graph';
|
|
6
|
+
import { allSymbols } from './symbols';
|
|
7
|
+
import { allTerminals } from './terminals';
|
|
8
|
+
export const baseDecl = createToken({ name: 'BaseDecl', pattern: /base/i, label: 'BASE' });
|
|
9
|
+
export const prefixDecl = createToken({ name: 'PrefixDecl', pattern: /prefix/i, label: 'PREFIX' });
|
|
10
|
+
export const select = createToken({ name: 'Select', pattern: /select/i, label: 'SELECT' });
|
|
11
|
+
export const distinct = createToken({ name: 'Distinct', pattern: /distinct/i, label: 'DISTINCT' });
|
|
12
|
+
export const reduced = createToken({ name: 'Reduced', pattern: /reduced/i, label: 'REDUCED' });
|
|
13
|
+
export const as = createToken({ name: 'As', pattern: /as/i, label: 'AS' });
|
|
14
|
+
export const construct = createToken({ name: 'Construct', pattern: /construct/i, label: 'CONSTRUCT' });
|
|
15
|
+
export const describe = createToken({ name: 'Describe', pattern: /describe/i, label: 'DESCRIBE' });
|
|
16
|
+
export const ask = createToken({ name: 'Ask', pattern: /ask/i, label: 'ASK' });
|
|
17
|
+
export const from = createToken({ name: 'From', pattern: /from/i, label: 'FROM' });
|
|
18
|
+
export const where = createToken({ name: 'Where', pattern: /where/i, label: 'WHERE' });
|
|
19
|
+
export const groupBy = createToken({ name: 'GroupBy', pattern: /group by/i, label: 'GROUP BY' });
|
|
20
|
+
export const having = createToken({ name: 'Having', pattern: /having/i, label: 'HAVING' });
|
|
21
|
+
export const order = createToken({ name: 'Order', pattern: /order by/i, label: 'ORDER BY' });
|
|
22
|
+
export const orderAsc = createToken({ name: 'OrderAsc', pattern: /asc/i, label: 'ASC' });
|
|
23
|
+
export const orderDesc = createToken({ name: 'OrderDesc', pattern: /desc/i, label: 'DESC' });
|
|
24
|
+
export const limit = createToken({ name: 'Limit', pattern: /limit/i, label: 'LIMIT' });
|
|
25
|
+
export const offset = createToken({ name: 'Offset', pattern: /offset/i, label: 'OFFSET' });
|
|
26
|
+
export const values = createToken({ name: 'Values', pattern: /values/i, label: 'VALUES' });
|
|
27
|
+
export const load = createToken({ name: 'Load', pattern: /load/i, label: 'LOAD' });
|
|
28
|
+
export const silent = createToken({ name: 'Silent', pattern: /silent/i, label: 'SILENT' });
|
|
29
|
+
export const loadInto = createToken({ name: 'LoadInto', pattern: /into/i, label: 'INTO' });
|
|
30
|
+
export const clear = createToken({ name: 'Clear', pattern: /clear/i, label: 'CLEAR' });
|
|
31
|
+
export const drop = createToken({ name: 'Drop', pattern: /drop/i, label: 'DROP' });
|
|
32
|
+
export const create = createToken({ name: 'Create', pattern: /create/i, label: 'CREATE' });
|
|
33
|
+
export const add = createToken({ name: 'Add', pattern: /add/i, label: 'ADD' });
|
|
34
|
+
export const to = createToken({ name: 'To', pattern: /to/i, label: 'TO' });
|
|
35
|
+
export const move = createToken({ name: 'Move', pattern: /move/i, label: 'MOVE' });
|
|
36
|
+
export const copy = createToken({ name: 'Copy', pattern: /copy/i, label: 'COPY' });
|
|
37
|
+
export const modifyWith = createToken({ name: 'ModifyWith', pattern: /with/i, label: 'WITH' });
|
|
38
|
+
export const deleteClause = createToken({ name: 'DeleteClause', pattern: /delete/i, label: 'DELETE' });
|
|
39
|
+
export const insertClause = createToken({ name: 'InsertClause', pattern: /insert/i, label: 'INSERT' });
|
|
40
|
+
export const dataClause = createToken({ name: 'DataClause', pattern: /data/i, label: 'DATA', longer_alt: datatype });
|
|
41
|
+
export const usingClause = createToken({ name: 'UsingClause', pattern: /using/i, label: 'USING' });
|
|
42
|
+
export const optional = createToken({ name: 'Optional', pattern: /optional/i, label: 'OPTIONAL' });
|
|
43
|
+
export const service = createToken({ name: 'Service', pattern: /service/i, label: 'SERVICE' });
|
|
44
|
+
export const bind = createToken({ name: 'Bind', pattern: /bind/i, label: 'BIND' });
|
|
45
|
+
export const undef = createToken({ name: 'Undef', pattern: /undef/i, label: 'UNDEF' });
|
|
46
|
+
export const minus = createToken({ name: 'Minus', pattern: /minus/i, label: 'MINUS' });
|
|
47
|
+
export const union = createToken({ name: 'Union', pattern: /union/i, label: 'UNION' });
|
|
48
|
+
export const filter = createToken({ name: 'Filter', pattern: /filter/i, label: 'FILTER' });
|
|
49
|
+
export const a = createToken({ name: 'a', pattern: 'a', label: 'type declaration \'a\'' });
|
|
50
|
+
export const true_ = createToken({ name: 'True', pattern: /true/i, label: 'true' });
|
|
51
|
+
export const false_ = createToken({ name: 'False', pattern: /false/i, label: 'false' });
|
|
52
|
+
export const in_ = createToken({ name: 'In', pattern: /in/i, label: 'IN' });
|
|
53
|
+
export const notIn = createToken({ name: 'NotIn', pattern: /not in/i, label: 'NOT IN' });
|
|
54
|
+
export const separator = createToken({ name: 'Separator', pattern: /separator/i, label: 'SEPARATOR' });
|
|
55
|
+
export const allBaseTokens = LexerBuilder.create().add(baseDecl, prefixDecl, select, distinct, reduced, construct, describe, ask, from, where, groupBy, 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, as, a, true_, false_, in_, notIn, separator);
|
|
56
|
+
/**
|
|
57
|
+
* [!!!ORDER MATTERS!!!](https://chevrotain.io/docs/tutorial/step1_lexing.html#creating-the-lexer)
|
|
58
|
+
*/
|
|
59
|
+
export const sparql11Tokens = LexerBuilder
|
|
60
|
+
.create(allTerminals)
|
|
61
|
+
.merge(allBaseTokens)
|
|
62
|
+
.merge(allBuiltInCalls)
|
|
63
|
+
.merge(allGraphTokens)
|
|
64
|
+
.merge(allSymbols)
|
|
65
|
+
.moveBefore(datatype, dataClause)
|
|
66
|
+
.moveAfter(avg, a);
|
|
67
|
+
//# sourceMappingURL=lexer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lexer.js","sourceRoot":"","sources":["lexer.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,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,EA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AAE,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;AAEvG,MAAM,CAAC,MAAM,aAAa,GAAG,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,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 } from '@traqula/core';\nimport { 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"]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { LexerBuilder } from '@traqula/core';
|
|
2
|
+
export declare const LCurly: import("chevrotain").TokenType & {
|
|
3
|
+
name: "LCurly";
|
|
4
|
+
};
|
|
5
|
+
export declare const RCurly: import("chevrotain").TokenType & {
|
|
6
|
+
name: "RCurly";
|
|
7
|
+
};
|
|
8
|
+
export declare const dot: import("chevrotain").TokenType & {
|
|
9
|
+
name: "Dot";
|
|
10
|
+
};
|
|
11
|
+
export declare const comma: import("chevrotain").TokenType & {
|
|
12
|
+
name: "Comma";
|
|
13
|
+
};
|
|
14
|
+
export declare const semi: import("chevrotain").TokenType & {
|
|
15
|
+
name: "Semi";
|
|
16
|
+
};
|
|
17
|
+
export declare const LParen: import("chevrotain").TokenType & {
|
|
18
|
+
name: "LParen";
|
|
19
|
+
};
|
|
20
|
+
export declare const RParen: import("chevrotain").TokenType & {
|
|
21
|
+
name: "RParen";
|
|
22
|
+
};
|
|
23
|
+
export declare const LSquare: import("chevrotain").TokenType & {
|
|
24
|
+
name: "LSquare";
|
|
25
|
+
};
|
|
26
|
+
export declare const RSquare: import("chevrotain").TokenType & {
|
|
27
|
+
name: "RSquare";
|
|
28
|
+
};
|
|
29
|
+
export declare const pipe: import("chevrotain").TokenType & {
|
|
30
|
+
name: "Pipe";
|
|
31
|
+
};
|
|
32
|
+
export declare const slash: import("chevrotain").TokenType & {
|
|
33
|
+
name: "Slash";
|
|
34
|
+
};
|
|
35
|
+
export declare const hat: import("chevrotain").TokenType & {
|
|
36
|
+
name: "Hat";
|
|
37
|
+
};
|
|
38
|
+
export declare const question: import("chevrotain").TokenType & {
|
|
39
|
+
name: "Question";
|
|
40
|
+
};
|
|
41
|
+
export declare const star: import("chevrotain").TokenType & {
|
|
42
|
+
name: "Star";
|
|
43
|
+
};
|
|
44
|
+
export declare const opPlus: import("chevrotain").TokenType & {
|
|
45
|
+
name: "OpPlus";
|
|
46
|
+
};
|
|
47
|
+
export declare const opMinus: import("chevrotain").TokenType & {
|
|
48
|
+
name: "OpMinus";
|
|
49
|
+
};
|
|
50
|
+
export declare const exclamation: import("chevrotain").TokenType & {
|
|
51
|
+
name: "Exclamation";
|
|
52
|
+
};
|
|
53
|
+
export declare const logicAnd: import("chevrotain").TokenType & {
|
|
54
|
+
name: "LogicAnd";
|
|
55
|
+
};
|
|
56
|
+
export declare const logicOr: import("chevrotain").TokenType & {
|
|
57
|
+
name: "LogicOr";
|
|
58
|
+
};
|
|
59
|
+
export declare const equal: import("chevrotain").TokenType & {
|
|
60
|
+
name: "Equal";
|
|
61
|
+
};
|
|
62
|
+
export declare const notEqual: import("chevrotain").TokenType & {
|
|
63
|
+
name: "NotEqual";
|
|
64
|
+
};
|
|
65
|
+
export declare const lessThan: import("chevrotain").TokenType & {
|
|
66
|
+
name: "LessThan";
|
|
67
|
+
};
|
|
68
|
+
export declare const greaterThan: import("chevrotain").TokenType & {
|
|
69
|
+
name: "GreaterThan";
|
|
70
|
+
};
|
|
71
|
+
export declare const lessThanEqual: import("chevrotain").TokenType & {
|
|
72
|
+
name: "LessThanEqual";
|
|
73
|
+
};
|
|
74
|
+
export declare const greaterThanEqual: import("chevrotain").TokenType & {
|
|
75
|
+
name: "GreaterThanEqual";
|
|
76
|
+
};
|
|
77
|
+
export declare const hathat: import("chevrotain").TokenType & {
|
|
78
|
+
name: "Hathat";
|
|
79
|
+
};
|
|
80
|
+
export declare const allSymbols: LexerBuilder<"" | "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">;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LexerBuilder } from '@traqula/core';
|
|
2
|
+
import { createToken } from '@traqula/core';
|
|
3
|
+
export const LCurly = createToken({ name: 'LCurly', pattern: '{', label: '{' });
|
|
4
|
+
export const RCurly = createToken({ name: 'RCurly', pattern: '}', label: '}' });
|
|
5
|
+
export const dot = createToken({ name: 'Dot', pattern: '.', label: '.' });
|
|
6
|
+
export const comma = createToken({ name: 'Comma', pattern: ',', label: ',' });
|
|
7
|
+
export const semi = createToken({ name: 'Semi', pattern: ';', label: ';' });
|
|
8
|
+
export const LParen = createToken({ name: 'LParen', pattern: '(', label: '(' });
|
|
9
|
+
export const RParen = createToken({ name: 'RParen', pattern: ')', label: ')' });
|
|
10
|
+
export const LSquare = createToken({ name: 'LSquare', pattern: '[', label: '[' });
|
|
11
|
+
export const RSquare = createToken({ name: 'RSquare', pattern: ']', label: ']' });
|
|
12
|
+
export const pipe = createToken({ name: 'Pipe', pattern: '|', label: '|' });
|
|
13
|
+
export const slash = createToken({ name: 'Slash', pattern: '/', label: '/' });
|
|
14
|
+
export const hat = createToken({ name: 'Hat', pattern: '^', label: '^' });
|
|
15
|
+
export const question = createToken({ name: 'Question', pattern: '?', label: '?' });
|
|
16
|
+
export const star = createToken({ name: 'Star', pattern: '*', label: '*' });
|
|
17
|
+
export const opPlus = createToken({ name: 'OpPlus', pattern: '+', label: '+' });
|
|
18
|
+
export const opMinus = createToken({ name: 'OpMinus', pattern: '-', label: '-' });
|
|
19
|
+
export const exclamation = createToken({ name: 'Exclamation', pattern: '!', label: '!' });
|
|
20
|
+
export const logicAnd = createToken({ name: 'LogicAnd', pattern: '&&', label: '&&' });
|
|
21
|
+
export const logicOr = createToken({ name: 'LogicOr', pattern: '||', label: '||' });
|
|
22
|
+
export const equal = createToken({ name: 'Equal', pattern: '=', label: '=' });
|
|
23
|
+
export const notEqual = createToken({ name: 'NotEqual', pattern: '!=', label: '!=' });
|
|
24
|
+
export const lessThan = createToken({ name: 'LessThan', pattern: '<', label: '<' });
|
|
25
|
+
export const greaterThan = createToken({ name: 'GreaterThan', pattern: '>', label: '>' });
|
|
26
|
+
export const lessThanEqual = createToken({ name: 'LessThanEqual', pattern: '<=', label: '<=' });
|
|
27
|
+
export const greaterThanEqual = createToken({ name: 'GreaterThanEqual', pattern: '>=', label: '>=' });
|
|
28
|
+
export const hathat = createToken({ name: 'Hathat', pattern: '^^', label: '^^' });
|
|
29
|
+
export const allSymbols = LexerBuilder.create().add(logicAnd, logicOr, notEqual, lessThanEqual, greaterThanEqual, LCurly, RCurly, dot, comma, semi, LParen, RParen, LSquare, RSquare, pipe, slash, hathat, hat, question, star, opPlus, opMinus, exclamation, equal, lessThan, greaterThan);
|
|
30
|
+
//# sourceMappingURL=symbols.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbols.js","sourceRoot":"","sources":["symbols.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;AAChF,MAAM,CAAC,MAAM,MAAM,GAAG,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;AAChF,MAAM,CAAC,MAAM,GAAG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","sourcesContent":["import { LexerBuilder } from '@traqula/core';\nimport { createToken } from '@traqula/core';\n\nexport const LCurly = createToken({ name: 'LCurly', pattern: '{', label: '{' });\nexport const RCurly = createToken({ name: 'RCurly', pattern: '}', label: '}' });\nexport const dot = createToken({ name: 'Dot', pattern: '.', label: '.' });\nexport const comma = createToken({ name: 'Comma', pattern: ',', label: ',' });\nexport const semi = createToken({ name: 'Semi', pattern: ';', label: ';' });\nexport const LParen = createToken({ name: 'LParen', pattern: '(', label: '(' });\nexport const RParen = createToken({ name: 'RParen', pattern: ')', label: ')' });\nexport const LSquare = createToken({ name: 'LSquare', pattern: '[', label: '[' });\nexport const RSquare = createToken({ name: 'RSquare', pattern: ']', label: ']' });\nexport const pipe = createToken({ name: 'Pipe', pattern: '|', label: '|' });\nexport const slash = createToken({ name: 'Slash', pattern: '/', label: '/' });\nexport const hat = createToken({ name: 'Hat', pattern: '^', label: '^' });\nexport const question = createToken({ name: 'Question', pattern: '?', label: '?' });\nexport const star = createToken({ name: 'Star', pattern: '*', label: '*' });\nexport const opPlus = createToken({ name: 'OpPlus', pattern: '+', label: '+' });\nexport const opMinus = createToken({ name: 'OpMinus', pattern: '-', label: '-' });\nexport const exclamation = createToken({ name: 'Exclamation', pattern: '!', label: '!' });\nexport const logicAnd = createToken({ name: 'LogicAnd', pattern: '&&', label: '&&' });\nexport const logicOr = createToken({ name: 'LogicOr', pattern: '||', label: '||' });\nexport const equal = createToken({ name: 'Equal', pattern: '=', label: '=' });\nexport const notEqual = createToken({ name: 'NotEqual', pattern: '!=', label: '!=' });\nexport const lessThan = createToken({ name: 'LessThan', pattern: '<', label: '<' });\nexport const greaterThan = createToken({ name: 'GreaterThan', pattern: '>', label: '>' });\nexport const lessThanEqual = createToken({ name: 'LessThanEqual', pattern: '<=', label: '<=' });\nexport const greaterThanEqual = createToken({ name: 'GreaterThanEqual', pattern: '>=', label: '>=' });\nexport const hathat = createToken({ name: 'Hathat', pattern: '^^', label: '^^' });\n\nexport const allSymbols = LexerBuilder.create().add(\n logicAnd,\n logicOr,\n notEqual,\n lessThanEqual,\n greaterThanEqual,\n LCurly,\n RCurly,\n dot,\n comma,\n semi,\n LParen,\n RParen,\n LSquare,\n RSquare,\n pipe,\n slash,\n hathat,\n hat,\n question,\n star,\n opPlus,\n opMinus,\n exclamation,\n equal,\n lessThan,\n greaterThan,\n);\n"]}
|
|
@@ -0,0 +1,108 @@
|
|
|
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
|
+
export declare const iriRef: import("chevrotain").TokenType & {
|
|
37
|
+
name: "IriRef";
|
|
38
|
+
};
|
|
39
|
+
export declare const pNameLn: import("chevrotain").TokenType & {
|
|
40
|
+
name: "PNameLn";
|
|
41
|
+
};
|
|
42
|
+
export declare const pNameNs: import("chevrotain").TokenType & {
|
|
43
|
+
name: "PNameNs";
|
|
44
|
+
};
|
|
45
|
+
export declare const blankNodeLabel: import("chevrotain").TokenType & {
|
|
46
|
+
name: "BlankNodeLabel";
|
|
47
|
+
};
|
|
48
|
+
export declare const var1: import("chevrotain").TokenType & {
|
|
49
|
+
name: "Var1";
|
|
50
|
+
};
|
|
51
|
+
export declare const var2: import("chevrotain").TokenType & {
|
|
52
|
+
name: "Var2";
|
|
53
|
+
};
|
|
54
|
+
export declare const langTag: import("chevrotain").TokenType & {
|
|
55
|
+
name: "LangTag";
|
|
56
|
+
};
|
|
57
|
+
export declare const integer: import("chevrotain").TokenType & {
|
|
58
|
+
name: "Integer";
|
|
59
|
+
};
|
|
60
|
+
export declare const decimal: import("chevrotain").TokenType & {
|
|
61
|
+
name: "Decimal";
|
|
62
|
+
};
|
|
63
|
+
export declare const double: import("chevrotain").TokenType & {
|
|
64
|
+
name: "Double";
|
|
65
|
+
};
|
|
66
|
+
export declare const interferePositive: import("chevrotain").TokenType & {
|
|
67
|
+
name: "InterferePositive";
|
|
68
|
+
};
|
|
69
|
+
export declare const decimalPositive: import("chevrotain").TokenType & {
|
|
70
|
+
name: "DecimalPositive";
|
|
71
|
+
};
|
|
72
|
+
export declare const doublePositive: import("chevrotain").TokenType & {
|
|
73
|
+
name: "DoublePositive";
|
|
74
|
+
};
|
|
75
|
+
export declare const integerNegative: import("chevrotain").TokenType & {
|
|
76
|
+
name: "IntegerNegative";
|
|
77
|
+
};
|
|
78
|
+
export declare const decimalNegative: import("chevrotain").TokenType & {
|
|
79
|
+
name: "DecimalNegative";
|
|
80
|
+
};
|
|
81
|
+
export declare const doubleNegative: import("chevrotain").TokenType & {
|
|
82
|
+
name: "DoubleNegative";
|
|
83
|
+
};
|
|
84
|
+
export declare const stringLiteral1: import("chevrotain").TokenType & {
|
|
85
|
+
name: "StringLiteral1";
|
|
86
|
+
};
|
|
87
|
+
export declare const stringLiteral2: import("chevrotain").TokenType & {
|
|
88
|
+
name: "StringLiteral2";
|
|
89
|
+
};
|
|
90
|
+
export declare const stringLiteralLong1: import("chevrotain").TokenType & {
|
|
91
|
+
name: "StringLiteralLong1";
|
|
92
|
+
};
|
|
93
|
+
export declare const stringLiteralLong2: import("chevrotain").TokenType & {
|
|
94
|
+
name: "StringLiteralLong2";
|
|
95
|
+
};
|
|
96
|
+
export declare const ws: import("chevrotain").TokenType & {
|
|
97
|
+
name: "Ws";
|
|
98
|
+
};
|
|
99
|
+
export declare const comment: import("chevrotain").TokenType & {
|
|
100
|
+
name: "Comment";
|
|
101
|
+
};
|
|
102
|
+
export declare const nil: import("chevrotain").TokenType & {
|
|
103
|
+
name: "Nil";
|
|
104
|
+
};
|
|
105
|
+
export declare const anon: import("chevrotain").TokenType & {
|
|
106
|
+
name: "Anon";
|
|
107
|
+
};
|
|
108
|
+
export declare const allTerminals: LexerBuilder<"" | "IriRef" | "PNameLn" | "PNameNs" | "BlankNodeLabel" | "Var1" | "Var2" | "LangTag" | "Integer" | "Decimal" | "Double" | "InterferePositive" | "DecimalPositive" | "DoublePositive" | "IntegerNegative" | "DecimalNegative" | "DoubleNegative" | "StringLiteral1" | "StringLiteral2" | "StringLiteralLong1" | "StringLiteralLong2" | "Ws" | "Comment" | "Nil" | "Anon">;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/* eslint-disable require-unicode-regexp,unicorn/better-regex */
|
|
2
|
+
import { Lexer } from 'chevrotain';
|
|
3
|
+
import { LexerBuilder } from '@traqula/core';
|
|
4
|
+
import { createToken } from '@traqula/core';
|
|
5
|
+
// eslint-disable-next-line max-len
|
|
6
|
+
export 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]/;
|
|
7
|
+
export const pnCharsUPattern = new RegExp(`${pnCharsBasePattern.source}|_`);
|
|
8
|
+
// eslint-disable-next-line no-misleading-character-class
|
|
9
|
+
export const varNamePattern = new RegExp(`((${pnCharsUPattern.source})|[0-9])((${pnCharsUPattern.source})|[0-9]|[\u00B7\u0300-\u036F\u203F-\u2040])*`);
|
|
10
|
+
// eslint-disable-next-line no-control-regex
|
|
11
|
+
export const iriRefPattern = /<([^\\<>"{}|^`\u0000-\u0020])*>/;
|
|
12
|
+
// eslint-disable-next-line no-misleading-character-class
|
|
13
|
+
export const pnCharsPattern = new RegExp(`(${pnCharsUPattern.source})|[\\-0-9\u00B7\u0300-\u036F\u203F-\u2040]`);
|
|
14
|
+
// eslint-disable-next-line no-misleading-character-class
|
|
15
|
+
export const pnPrefixPattern = new RegExp(`(${pnCharsBasePattern.source})(((${pnCharsPattern.source})|\\.)*(${pnCharsPattern.source}))?`);
|
|
16
|
+
// eslint-disable-next-line no-misleading-character-class
|
|
17
|
+
export const pNameNsPattern = new RegExp(`(${pnPrefixPattern.source})?:`);
|
|
18
|
+
export const percentPattern = /%[0-9A-Fa-f][0-9A-Fa-f]/;
|
|
19
|
+
export const pnLocalEscPattern = /\\[_~.\-!$&'()*+,;=\\/?#@%]/;
|
|
20
|
+
export const plxPattern = new RegExp(`(${percentPattern.source})|(${pnLocalEscPattern.source})`);
|
|
21
|
+
// eslint-disable-next-line no-misleading-character-class
|
|
22
|
+
export const pnLocalPattern = new RegExp(`((${pnCharsUPattern.source})|:|[0-9]|(${plxPattern.source}))(((${pnCharsPattern.source})|\\.|:|(${plxPattern.source}))*((${pnCharsPattern.source})|:|(${plxPattern.source})))?`);
|
|
23
|
+
// eslint-disable-next-line no-misleading-character-class
|
|
24
|
+
export const pNameLnPattern = new RegExp(`(${pNameNsPattern.source})(${pnLocalPattern.source})`);
|
|
25
|
+
// eslint-disable-next-line no-misleading-character-class
|
|
26
|
+
export const blankNodeLabelPattern = new RegExp(`_:(?:(?:${pnCharsUPattern.source})|[0-9])(?:(?:(?:${pnCharsPattern.source})|\\.)*(${pnCharsPattern.source}))?`);
|
|
27
|
+
// eslint-disable-next-line no-misleading-character-class
|
|
28
|
+
export const var1Pattern = new RegExp(`\\?(${varNamePattern.source})`);
|
|
29
|
+
// eslint-disable-next-line no-misleading-character-class
|
|
30
|
+
export const var2Pattern = new RegExp(`\\$(${varNamePattern.source})`);
|
|
31
|
+
export const langTagPattern = /@[a-zA-Z]+(-[a-zA-Z0-9]+)*/;
|
|
32
|
+
export const integerPattern = /[0-9]+/;
|
|
33
|
+
export const decimalPattern = /[0-9]+\.[0-9]+/;
|
|
34
|
+
export const exponentPattern = /[eE][+-]?[0-9]+/;
|
|
35
|
+
export const doublePattern = new RegExp(`([0-9]+\\.[0-9]*(${exponentPattern.source}))|(\\.[0-9]+(${exponentPattern.source}))|([0-9]+(${exponentPattern.source}))`);
|
|
36
|
+
export const interferePositivePattern = new RegExp(`\\+${integerPattern.source}`);
|
|
37
|
+
export const decimalPositivePattern = new RegExp(`\\+${decimalPattern.source}`);
|
|
38
|
+
export const doublePositivePattern = new RegExp(`\\+${doublePattern.source}`);
|
|
39
|
+
export const integerNegativePattern = new RegExp(`-${integerPattern.source}`);
|
|
40
|
+
export const decimalNegativePattern = new RegExp(`-${decimalPattern.source}`);
|
|
41
|
+
export const doubleNegativePattern = new RegExp(`-${doublePattern.source}`);
|
|
42
|
+
export const echarPattern = /\\[\\"'bfnrt]/u;
|
|
43
|
+
export const stringLiteral1Pattern = new RegExp(`'(?:([^\\u0027\\u005C\\u000A\u000D])|(?:${echarPattern.source}))*'`);
|
|
44
|
+
export const stringLiteral2Pattern = new RegExp(`"(?:([^\\u0022\\u005C\\u000A\\u000D])|(?:${echarPattern.source}))*"`);
|
|
45
|
+
export const stringLiteralLong1Pattern = new RegExp(`'''(('|(''))?([^'\\\\]|(${echarPattern.source})))*'''`);
|
|
46
|
+
export const stringLiteralLong2Pattern = new RegExp(`"""(("|(""))?([^"\\\\]|(${echarPattern.source})))*"""`);
|
|
47
|
+
// eslint-disable-next-line no-control-regex
|
|
48
|
+
export const wsPattern = /[\u0020\u0009\u000D\u000A]/;
|
|
49
|
+
export const nilPattern = new RegExp(`\\((${wsPattern.source})*\\)`);
|
|
50
|
+
export const anonPattern = new RegExp(`\\[(${wsPattern.source})*\\]`);
|
|
51
|
+
export const iriRef = createToken({ name: 'IriRef', pattern: iriRefPattern });
|
|
52
|
+
export const pNameLn = createToken({ name: 'PNameLn', pattern: pNameLnPattern });
|
|
53
|
+
export const pNameNs = createToken({ name: 'PNameNs', pattern: pNameNsPattern, longer_alt: [pNameLn] });
|
|
54
|
+
export const blankNodeLabel = createToken({ name: 'BlankNodeLabel', pattern: blankNodeLabelPattern });
|
|
55
|
+
export const var1 = createToken({ name: 'Var1', pattern: var1Pattern });
|
|
56
|
+
export const var2 = createToken({ name: 'Var2', pattern: var2Pattern });
|
|
57
|
+
export const langTag = createToken({ name: 'LangTag', pattern: langTagPattern });
|
|
58
|
+
export const integer = createToken({ name: 'Integer', pattern: integerPattern });
|
|
59
|
+
export const decimal = createToken({ name: 'Decimal', pattern: decimalPattern });
|
|
60
|
+
export const double = createToken({ name: 'Double', pattern: doublePattern });
|
|
61
|
+
export const interferePositive = createToken({ name: 'InterferePositive', pattern: interferePositivePattern });
|
|
62
|
+
export const decimalPositive = createToken({ name: 'DecimalPositive', pattern: decimalPositivePattern });
|
|
63
|
+
export const doublePositive = createToken({ name: 'DoublePositive', pattern: doublePositivePattern });
|
|
64
|
+
export const integerNegative = createToken({ name: 'IntegerNegative', pattern: integerNegativePattern });
|
|
65
|
+
export const decimalNegative = createToken({ name: 'DecimalNegative', pattern: decimalNegativePattern });
|
|
66
|
+
export const doubleNegative = createToken({ name: 'DoubleNegative', pattern: doubleNegativePattern });
|
|
67
|
+
export const stringLiteral1 = createToken({ name: 'StringLiteral1', pattern: stringLiteral1Pattern });
|
|
68
|
+
export const stringLiteral2 = createToken({ name: 'StringLiteral2', pattern: stringLiteral2Pattern });
|
|
69
|
+
export const stringLiteralLong1 = createToken({ name: 'StringLiteralLong1', pattern: stringLiteralLong1Pattern });
|
|
70
|
+
export const stringLiteralLong2 = createToken({ name: 'StringLiteralLong2', pattern: stringLiteralLong2Pattern });
|
|
71
|
+
export const ws = createToken({ name: 'Ws', pattern: wsPattern, group: Lexer.SKIPPED });
|
|
72
|
+
export const comment = createToken({ name: 'Comment', pattern: /#[^\n]*/, group: Lexer.SKIPPED });
|
|
73
|
+
export const nil = createToken({ name: 'Nil', pattern: nilPattern });
|
|
74
|
+
export const anon = createToken({ name: 'Anon', pattern: anonPattern });
|
|
75
|
+
export const allTerminals = LexerBuilder.create().add(iriRef, pNameNs, pNameLn, blankNodeLabel, var1, var2, langTag, double, decimal, integer, interferePositive, decimalPositive, doublePositive, integerNegative, decimalNegative, doubleNegative, stringLiteralLong1, stringLiteralLong2, stringLiteral1, stringLiteral2, ws, comment, nil, anon);
|
|
76
|
+
//# sourceMappingURL=terminals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminals.js","sourceRoot":"","sources":["terminals.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,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G,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,iBAAiB,EACjB,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,unicorn/better-regex */\nimport { Lexer } from 'chevrotain';\nimport { LexerBuilder } from '@traqula/core';\nimport { createToken } from '@traqula/core';\n\n// eslint-disable-next-line max-len\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}|_`);\n// eslint-disable-next-line no-misleading-character-class\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])*>/;\n// eslint-disable-next-line no-misleading-character-class\nexport const pnCharsPattern = new RegExp(`(${pnCharsUPattern.source})|[\\\\-0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]`);\n// eslint-disable-next-line no-misleading-character-class\nexport const pnPrefixPattern = new RegExp(`(${pnCharsBasePattern.source})(((${pnCharsPattern.source})|\\\\.)*(${pnCharsPattern.source}))?`);\n// eslint-disable-next-line no-misleading-character-class\nexport const pNameNsPattern = new RegExp(`(${pnPrefixPattern.source})?:`);\nexport const percentPattern = /%[0-9A-Fa-f][0-9A-Fa-f]/;\nexport const pnLocalEscPattern = /\\\\[_~.\\-!$&'()*+,;=\\\\/?#@%]/;\nexport const plxPattern = new RegExp(`(${percentPattern.source})|(${pnLocalEscPattern.source})`);\n// eslint-disable-next-line no-misleading-character-class\nexport const pnLocalPattern = new RegExp(`((${pnCharsUPattern.source})|:|[0-9]|(${plxPattern.source}))(((${pnCharsPattern.source})|\\\\.|:|(${plxPattern.source}))*((${pnCharsPattern.source})|:|(${plxPattern.source})))?`);\n// eslint-disable-next-line no-misleading-character-class\nexport const pNameLnPattern = new RegExp(`(${pNameNsPattern.source})(${pnLocalPattern.source})`);\n// eslint-disable-next-line no-misleading-character-class\nexport const blankNodeLabelPattern = new RegExp(`_:(?:(?:${pnCharsUPattern.source})|[0-9])(?:(?:(?:${pnCharsPattern.source})|\\\\.)*(${pnCharsPattern.source}))?`);\n// eslint-disable-next-line no-misleading-character-class\nexport const var1Pattern = new RegExp(`\\\\?(${varNamePattern.source})`);\n// eslint-disable-next-line no-misleading-character-class\nexport const var2Pattern = new RegExp(`\\\\$(${varNamePattern.source})`);\nexport const langTagPattern = /@[a-zA-Z]+(-[a-zA-Z0-9]+)*/;\nexport const integerPattern = /[0-9]+/;\nexport const decimalPattern = /[0-9]+\\.[0-9]+/;\nexport const exponentPattern = /[eE][+-]?[0-9]+/;\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 = /[\\u0020\\u0009\\u000D\\u000A]/;\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 interferePositive = 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 interferePositive,\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
ADDED
package/lib/utils.js
ADDED
package/lib/utils.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["utils.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,aAAa,CAAC,KAAmB;IAC/C,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAyB;IAClD,OAAO,UAAU,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,UAAU,CAAC;AAC5D,CAAC","sourcesContent":["import type {GroupPattern, Pattern, PropertyPath, Term, VariableTerm} from \"./Sparql11types\";\n\nexport function deGroupSingle(group: GroupPattern): Pattern {\n return group.patterns.length === 1 ? group.patterns[0] : group;\n}\n\nexport function isVariable(term: Term | PropertyPath): term is VariableTerm {\n return 'termType' in term && term.termType === 'Variable';\n}"]}
|