@fraczak/k 3.0.1 → 3.1.0
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/BIG_PICTURE.md +220 -0
- package/Code-derivation-tests/blowup.mjs +27 -0
- package/Code-derivation-tests/bnat.mjs +4 -2
- package/Code-derivation-tests/built-in.mjs +1 -1
- package/Code-derivation-tests/dot.mjs +28 -3
- package/Code-derivation-tests/index.mjs +2 -2
- package/Code-derivation-tests/loop.mjs +1 -1
- package/Code-derivation-tests/nat.mjs +2 -2
- package/Code-derivation-tests/not-not.mjs +2 -2
- package/Code-derivation-tests/product.mjs +9 -5
- package/Code-derivation-tests/rlz.mjs +2 -2
- package/Code-derivation-tests/vector.mjs +8 -14
- package/Graph.mjs +95 -0
- package/TYPING.md +368 -0
- package/aaa.txt +203033 -0
- package/codes.mjs +60 -8
- package/hash.mjs +6 -5
- package/index.mjs +7 -38
- package/k.mjs +3 -3
- package/package.json +1 -1
- package/parser.jison +14 -6
- package/parser.mjs +68 -62
- package/patterns.mjs +386 -534
- package/repl.mjs +41 -9
- package/run.mjs +7 -5
- package/symbol-table.mjs +44 -41
- package/test-filters.mjs +3 -3
- package/typing-test.mjs +40 -0
- package/typing.mjs +528 -0
- package/TODO.md +0 -54
package/codes.mjs
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import hash from "./hash.mjs";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const theRepository = { codes: { } };
|
|
5
|
+
|
|
6
|
+
const unitCode = function() {
|
|
7
|
+
const unitCodeDef = encodeCodeToString("{}", { "{}": { code: "product", product: [] } });
|
|
8
|
+
return hash(unitCodeDef);
|
|
9
|
+
}();
|
|
10
|
+
|
|
1
11
|
function isBuiltIn(code) {
|
|
2
12
|
return code.match(/^(int|string|bool)$/);
|
|
3
13
|
}
|
|
4
14
|
|
|
5
|
-
function logCeiling(n, base = 2) {
|
|
6
|
-
return Math.ceil(Math.log(n) / Math.log(base));
|
|
7
|
-
}
|
|
8
|
-
|
|
9
15
|
function encodeCodeToString(code, codes) {
|
|
10
16
|
if (isBuiltIn(code)) return code;
|
|
11
17
|
var i = 0;
|
|
@@ -86,9 +92,9 @@ function are_different(classes, representatives, name1, name2, codes) {
|
|
|
86
92
|
function minimize(codes) {
|
|
87
93
|
const names = Object.keys(codes);
|
|
88
94
|
const classes = {};
|
|
89
|
-
classes[
|
|
95
|
+
classes[unitCode] = names;
|
|
90
96
|
const representatives = names.reduce((representatives, name) => {
|
|
91
|
-
representatives[name] =
|
|
97
|
+
representatives[name] = unitCode;
|
|
92
98
|
return representatives;
|
|
93
99
|
}, {});
|
|
94
100
|
let changed = true;
|
|
@@ -153,6 +159,52 @@ function normalizeAll(codes, representatives) {
|
|
|
153
159
|
}, {});
|
|
154
160
|
}
|
|
155
161
|
|
|
162
|
+
function finalize(codes) {
|
|
163
|
+
const representatives = minimize(codes).representatives;
|
|
164
|
+
const normalizedCodes = normalizeAll(codes, representatives);
|
|
165
|
+
const globalNames = Object.keys(normalizedCodes).reduce((globalNames, name) => {
|
|
166
|
+
const globalDef = encodeCodeToString(name, normalizedCodes);
|
|
167
|
+
normalizedCodes[name].def = globalDef;
|
|
168
|
+
globalNames[name] = hash(globalDef);
|
|
169
|
+
return globalNames;
|
|
170
|
+
}, {});
|
|
171
|
+
const globalCodes = Object.keys(normalizedCodes).reduce((globalCodes, name) => {
|
|
172
|
+
globalCodes[globalNames[name]] = normalizedCodes[name];
|
|
173
|
+
return globalCodes;
|
|
174
|
+
},{});
|
|
175
|
+
// console.log("globalCodes",globalCodes);
|
|
176
|
+
|
|
177
|
+
const extendedRepresentatives = Object.keys(representatives).reduce((result, name) => {
|
|
178
|
+
result[name] = globalNames[representatives[name]] || name;
|
|
179
|
+
return result;
|
|
180
|
+
}, Object.values(globalNames).reduce((result, name) => ({[name]: name, ...result}),{}));
|
|
181
|
+
// console.log("extendedRepresentatives",extendedRepresentatives);
|
|
182
|
+
|
|
183
|
+
const normalizedGlobalCodes = normalizeAll(globalCodes, extendedRepresentatives);
|
|
184
|
+
// console.log("normalizedGlobalCodes",normalizedGlobalCodes);
|
|
185
|
+
|
|
186
|
+
return {
|
|
187
|
+
codes: normalizedGlobalCodes,
|
|
188
|
+
representatives: extendedRepresentatives
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function register(newCodes) {
|
|
193
|
+
const { codes, representatives } = finalize( {...newCodes,...theRepository.codes});
|
|
194
|
+
const reps = Object.values(representatives).reduce((reps,rep) =>
|
|
195
|
+
({...reps, [rep]:rep})
|
|
196
|
+
, {});
|
|
197
|
+
for (const rep in reps) {
|
|
198
|
+
theRepository.codes[rep] = codes[rep];
|
|
199
|
+
};
|
|
200
|
+
return representatives;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function find(codeName) {
|
|
204
|
+
if (isBuiltIn(codeName))
|
|
205
|
+
return {code: codeName, def: "built-in["+codeName+"]"};
|
|
206
|
+
return JSON.parse(JSON.stringify(theRepository.codes[codeName]));
|
|
207
|
+
};
|
|
156
208
|
|
|
157
|
-
export default { minimize, normalize, normalizeAll, encodeCodeToString };
|
|
158
|
-
export { minimize, normalize, normalizeAll, encodeCodeToString };
|
|
209
|
+
export default { minimize, normalize, normalizeAll, encodeCodeToString, finalize, unitCode, register, find };
|
|
210
|
+
export { minimize, normalize, normalizeAll, encodeCodeToString, finalize, unitCode, register, find };
|
package/hash.mjs
CHANGED
|
@@ -22,13 +22,14 @@ function shifString(baseString) {
|
|
|
22
22
|
|
|
23
23
|
function hash(inputString) {
|
|
24
24
|
if (inputString.match(/^\$C0=.*;$/))
|
|
25
|
-
inputString = inputString.slice(4
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
25
|
+
inputString = inputString.slice(4, -1);
|
|
26
|
+
|
|
27
|
+
let hashValue = BigInt(0);
|
|
28
|
+
const prime = BigInt(2);
|
|
29
|
+
const mod = BigInt('8494462356974657160929849007317');
|
|
29
30
|
|
|
30
31
|
for (let i = 0; i < inputString.length; i++) {
|
|
31
|
-
let charCode = inputString.charCodeAt(i);
|
|
32
|
+
let charCode = BigInt(inputString.charCodeAt(i));
|
|
32
33
|
hashValue = (hashValue * prime + charCode) % mod;
|
|
33
34
|
}
|
|
34
35
|
|
package/index.mjs
CHANGED
|
@@ -2,53 +2,22 @@ import { parse } from "./parser.mjs";
|
|
|
2
2
|
import { patterns } from "./patterns.mjs";
|
|
3
3
|
import run from "./run.mjs";
|
|
4
4
|
import t from "./codes.mjs";
|
|
5
|
-
import hash from "./hash.mjs";
|
|
6
|
-
|
|
7
|
-
function finalize(codes) {
|
|
8
|
-
const representatives = t.minimize(codes).representatives;
|
|
9
|
-
const normalizedCodes = t.normalizeAll(codes, representatives);
|
|
10
|
-
const globalNames = Object.keys(normalizedCodes).reduce((globalNames, name) => {
|
|
11
|
-
const globalDef = t.encodeCodeToString(name, normalizedCodes);
|
|
12
|
-
normalizedCodes[name].def = globalDef;
|
|
13
|
-
globalNames[name] = hash(globalDef);
|
|
14
|
-
return globalNames;
|
|
15
|
-
}, {});
|
|
16
|
-
const globalCodes = Object.keys(normalizedCodes).reduce((globalCodes, name) => {
|
|
17
|
-
globalCodes[globalNames[name]] = normalizedCodes[name];
|
|
18
|
-
return globalCodes;
|
|
19
|
-
},{});
|
|
20
|
-
// console.log("globalCodes",globalCodes);
|
|
21
|
-
|
|
22
|
-
const extendedRepresentatives = Object.keys(representatives).reduce((result, name) => {
|
|
23
|
-
result[name] = globalNames[representatives[name]] || name;
|
|
24
|
-
return result;
|
|
25
|
-
}, Object.values(globalNames).reduce((result, name) => ({[name]: name, ...result}),{}));
|
|
26
|
-
// console.log("extendedRepresentatives",extendedRepresentatives);
|
|
27
|
-
|
|
28
|
-
const normalizedGlobalCodes = t.normalizeAll(globalCodes, extendedRepresentatives);
|
|
29
|
-
// console.log("normalizedGlobalCodes",normalizedGlobalCodes);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return {
|
|
33
|
-
codes: normalizedGlobalCodes,
|
|
34
|
-
representatives: extendedRepresentatives
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
5
|
|
|
38
6
|
function compile(script) {
|
|
39
7
|
try {
|
|
40
8
|
run.defs = annotate(script);
|
|
41
9
|
} catch (e) {
|
|
42
10
|
console.error(e);
|
|
11
|
+
console.error("WARN: Recompiling without type reconciliation due to the type error above.");
|
|
43
12
|
const { defs, exp } = parse(script);
|
|
44
|
-
const { codes, representatives } = finalize(defs.codes);
|
|
13
|
+
const { codes, representatives } = t.finalize(defs.codes);
|
|
45
14
|
run.defs = {
|
|
46
|
-
rels: {...defs.rels, "__main__":
|
|
15
|
+
rels: {...defs.rels, "__main__": {def: exp}},
|
|
47
16
|
codes, representatives
|
|
48
17
|
};
|
|
49
|
-
|
|
18
|
+
|
|
50
19
|
}
|
|
51
|
-
return run.bind(null, run.defs.rels.__main__
|
|
20
|
+
return run.bind(null, run.defs.rels.__main__.def);
|
|
52
21
|
}
|
|
53
22
|
|
|
54
23
|
compile.doc = "Transforms k-script (string) into a function";
|
|
@@ -61,9 +30,9 @@ runScriptOnData.doc = "Run 'script' (string) on 'data': (script,data) -> data";
|
|
|
61
30
|
|
|
62
31
|
function annotate(script) {
|
|
63
32
|
const { defs, exp } = parse(script);
|
|
64
|
-
const { codes, representatives } = finalize(defs.codes);
|
|
33
|
+
const { codes, representatives } = t.finalize(defs.codes);
|
|
65
34
|
|
|
66
|
-
const rels = {...defs.rels, "__main__":
|
|
35
|
+
const rels = {...defs.rels, "__main__": {def: exp}};
|
|
67
36
|
|
|
68
37
|
const pats = patterns(codes, representatives, rels);
|
|
69
38
|
|
package/k.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#!/usr/bin/
|
|
1
|
+
#!/usr/bin/node --stack-size=8000
|
|
2
|
+
// #!/usr/bin/env node
|
|
3
|
+
// !/usr/bin/node --stack-size=8000
|
|
2
4
|
|
|
3
5
|
import fs from "node:fs";
|
|
4
6
|
import k from "./index.mjs";
|
|
5
7
|
|
|
6
|
-
const splice = [].splice;
|
|
7
|
-
|
|
8
8
|
const prog = process.argv[1];
|
|
9
9
|
|
|
10
10
|
let kScript, jsonStream, oneJson;
|
package/package.json
CHANGED
package/parser.jison
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
%{
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { SymbolTable, comp, union, identity } from "./symbol-table.mjs";
|
|
4
|
+
let s = new SymbolTable();
|
|
4
5
|
|
|
5
6
|
function getToken(yytext,yy,lstack) {
|
|
6
7
|
const yylloc = yy.lexer.yylloc;
|
|
@@ -61,6 +62,7 @@ function fromEscString(escString) {
|
|
|
61
62
|
\"([^"\\]|\\(.|\n))*\"|\'([^'\\]|\\(.|\n))*\' return 'STRING';
|
|
62
63
|
[a-zA-Z_][a-zA-Z0-9_?!]* return 'NAME';
|
|
63
64
|
0|[-]?[1-9][0-9]* return 'INT';
|
|
65
|
+
"+++" return 'INCREMENTAL';
|
|
64
66
|
<<EOF>> return 'EOF';
|
|
65
67
|
|
|
66
68
|
/lex
|
|
@@ -92,14 +94,20 @@ sc: SC { $$ = getToken(yytext,yy,_$); };
|
|
|
92
94
|
col: COL { $$ = getToken(yytext,yy,_$); };
|
|
93
95
|
dollar: DOLLAR { $$ = getToken(yytext,yy,_$); };
|
|
94
96
|
qmark: QMARK { $$ = getToken(yytext,yy,_$); };
|
|
97
|
+
incremental: INCREMENTAL { $$ = getToken(yytext,yy,_$); };
|
|
95
98
|
|
|
96
|
-
input_with_eof: defs comp EOF {
|
|
97
|
-
const result = {defs: {rels: s.rels, codes: s.codes}, exp: $
|
|
99
|
+
input_with_eof: initialize_symbol_table defs comp EOF {
|
|
100
|
+
const result = {defs: {rels: s.rels, codes: s.codes}, exp: $3};
|
|
98
101
|
// console.log(JSON.stringify(result, "", 2));
|
|
99
102
|
// process.exit(0);
|
|
100
103
|
return result;
|
|
101
104
|
};
|
|
102
105
|
|
|
106
|
+
initialize_symbol_table
|
|
107
|
+
: { s = new SymbolTable();}
|
|
108
|
+
| incremental { }
|
|
109
|
+
;
|
|
110
|
+
|
|
103
111
|
defs: { }
|
|
104
112
|
| defs name eq comp sc { s.add_rel($2.value,$4); }
|
|
105
113
|
| defs dollar name eq codeDef SC { s.add_code($3.value,$5); }
|
|
@@ -178,16 +186,16 @@ filter_label
|
|
|
178
186
|
|
|
179
187
|
comp
|
|
180
188
|
: exp { $$ = $1; }
|
|
181
|
-
| comp exp { $$ = {...
|
|
189
|
+
| comp exp { $$ = {...comp($1, $2), start: $1.start, end:$2.end}; }
|
|
182
190
|
| comp CARET { $$ = {op: 'caret', caret: $1, start: $1.start, end:$2.end}; }
|
|
183
191
|
;
|
|
184
192
|
|
|
185
193
|
exp
|
|
186
194
|
: lc labelled rc { $$ = {...$2, start: $1.start, end: $3.end}; }
|
|
187
195
|
| lb list rb { $$ = {op: "vector", vector: $2, start: $1.start, end: $3.end}; }
|
|
188
|
-
| la list ra { $$ = {...
|
|
196
|
+
| la list ra { $$ = {...union($2), start: $1.start, end: $3.end}; }
|
|
189
197
|
| name { $$ = {op: "ref", ref: $1.value, start: $1.start, end: $1.end}; }
|
|
190
|
-
| lp rp { $$ = {...
|
|
198
|
+
| lp rp { $$ = {...identity, start: $1.start, end: $2.end}; }
|
|
191
199
|
| lp comp rp { $$ = {...$2, start: $1.start, end: $3.end }; }
|
|
192
200
|
| str { $$ = {op: "str", str: $1.value, start: $1.start, end: $1.end }; }
|
|
193
201
|
| int { $$ = {op: "int", int: $1.value, start: $1.start, end: $1.end }; }
|
package/parser.mjs
CHANGED
|
@@ -75,7 +75,8 @@
|
|
|
75
75
|
|
|
76
76
|
|
|
77
77
|
|
|
78
|
-
import
|
|
78
|
+
import { SymbolTable, comp, union, identity } from "./symbol-table.mjs";
|
|
79
|
+
let s = new SymbolTable();
|
|
79
80
|
|
|
80
81
|
function getToken(yytext,yy,lstack) {
|
|
81
82
|
const yylloc = yy.lexer.yylloc;
|
|
@@ -110,18 +111,18 @@ function fromEscString(escString) {
|
|
|
110
111
|
|
|
111
112
|
|
|
112
113
|
var parser = (function(){
|
|
113
|
-
var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[4,6,8,10,12,14,16,30,38,40,
|
|
114
|
+
var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[4,6,8,10,12,14,16,30,38,40,61],$V1=[1,10],$V2=[1,25],$V3=[1,26],$V4=[1,23],$V5=[1,21],$V6=[1,22],$V7=[1,24],$V8=[1,27],$V9=[1,11],$Va=[1,28],$Vb=[1,20],$Vc=[1,31],$Vd=[4,6,8,10,12,14,16,30,38,40,47,58,61],$Ve=[2,65],$Vf=[1,35],$Vg=[4,6,8,10,12,14,16,18,20,22,24,30,32,34,38,40,47,58,61],$Vh=[2,86],$Vi=[1,55],$Vj=[2,68],$Vk=[2,69],$Vl=[4,6,8,10,12,14,16,18,20,22,24,30,32,34,36,38,40,47,58,61],$Vm=[4,6,8],$Vn=[2,27],$Vo=[2,32],$Vp=[1,79],$Vq=[1,81],$Vr=[20,32],$Vs=[4,6,8,10,12,14,16,30,38,40,58,61],$Vt=[1,86],$Vu=[1,90],$Vv=[18,22,32],$Vw=[1,93],$Vx=[2,42],$Vy=[2,48],$Vz=[1,104],$VA=[18,20,32],$VB=[2,80],$VC=[2,81],$VD=[2,82],$VE=[18,20,24,32];
|
|
114
115
|
var parser = {trace: function trace () { },
|
|
115
116
|
yy: {},
|
|
116
|
-
symbols_: {"error":2,"name":3,"NAME":4,"str":5,"STRING":6,"int":7,"INT":8,"la":9,"LA":10,"lc":11,"LC":12,"lb":13,"LB":14,"lp":15,"LP":16,"ra":17,"RA":18,"rc":19,"RC":20,"rb":21,"RB":22,"rp":23,"RP":24,"eq":25,"EQ":26,"dots":27,"DOTS":28,"dot":29,"DOT":30,"comma":31,"COMMA":32,"sc":33,"SC":34,"col":35,"COL":36,"dollar":37,"DOLLAR":38,"qmark":39,"QMARK":40,"
|
|
117
|
-
terminals_: {2:"error",4:"NAME",6:"STRING",8:"INT",10:"LA",12:"LC",14:"LB",16:"LP",18:"RA",20:"RC",22:"RB",24:"RP",26:"EQ",28:"DOTS",30:"DOT",32:"COMMA",34:"SC",36:"COL",38:"DOLLAR",40:"QMARK",
|
|
118
|
-
productions_: [0,[3,1],[5,1],[7,1],[9,1],[11,1],[13,1],[15,1],[17,1],[19,1],[21,1],[23,1],[25,1],[27,1],[29,1],[31,1],[33,1],[35,1],[37,1],[39,1],[41,
|
|
117
|
+
symbols_: {"error":2,"name":3,"NAME":4,"str":5,"STRING":6,"int":7,"INT":8,"la":9,"LA":10,"lc":11,"LC":12,"lb":13,"LB":14,"lp":15,"LP":16,"ra":17,"RA":18,"rc":19,"RC":20,"rb":21,"RB":22,"rp":23,"RP":24,"eq":25,"EQ":26,"dots":27,"DOTS":28,"dot":29,"DOT":30,"comma":31,"COMMA":32,"sc":33,"SC":34,"col":35,"COL":36,"dollar":37,"DOLLAR":38,"qmark":39,"QMARK":40,"incremental":41,"INCREMENTAL":42,"input_with_eof":43,"initialize_symbol_table":44,"defs":45,"comp":46,"EOF":47,"codeDef":48,"code":49,"labelled_codes":50,"non_empty_labelled_codes":51,"code_label":52,"filter":53,"labelled_filters":54,"non_empty_labelled_filters":55,"filter_label":56,"exp":57,"CARET":58,"labelled":59,"list":60,"PIPE":61,"non_empty_labelled":62,"comp_label":63,"non_empty_list":64,"$accept":0,"$end":1},
|
|
118
|
+
terminals_: {2:"error",4:"NAME",6:"STRING",8:"INT",10:"LA",12:"LC",14:"LB",16:"LP",18:"RA",20:"RC",22:"RB",24:"RP",26:"EQ",28:"DOTS",30:"DOT",32:"COMMA",34:"SC",36:"COL",38:"DOLLAR",40:"QMARK",42:"INCREMENTAL",47:"EOF",58:"CARET",61:"PIPE"},
|
|
119
|
+
productions_: [0,[3,1],[5,1],[7,1],[9,1],[11,1],[13,1],[15,1],[17,1],[19,1],[21,1],[23,1],[25,1],[27,1],[29,1],[31,1],[33,1],[35,1],[37,1],[39,1],[41,1],[43,4],[44,0],[44,1],[45,0],[45,5],[45,6],[49,1],[49,1],[48,3],[48,3],[48,3],[50,0],[50,1],[51,1],[51,3],[52,2],[52,2],[52,2],[52,3],[52,3],[52,3],[53,1],[53,2],[53,3],[53,3],[53,3],[53,3],[54,0],[54,1],[55,1],[55,3],[56,1],[56,2],[56,2],[56,2],[56,3],[56,3],[56,3],[46,1],[46,2],[46,2],[57,3],[57,3],[57,3],[57,1],[57,2],[57,3],[57,1],[57,1],[57,2],[57,2],[57,2],[57,2],[57,2],[57,1],[59,0],[59,1],[62,1],[62,3],[63,2],[63,2],[63,2],[63,3],[63,3],[63,3],[60,0],[60,1],[64,1],[64,3]],
|
|
119
120
|
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
|
120
121
|
/* this == yyval */
|
|
121
122
|
|
|
122
123
|
var $0 = $$.length - 1;
|
|
123
124
|
switch (yystate) {
|
|
124
|
-
case 1: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19:
|
|
125
|
+
case 1: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: case 19: case 20:
|
|
125
126
|
this.$ = getToken(yytext,yy,_$);
|
|
126
127
|
break;
|
|
127
128
|
case 2:
|
|
@@ -130,7 +131,7 @@ break;
|
|
|
130
131
|
case 3:
|
|
131
132
|
this.$ = getToken(yytext,yy,_$); this.$.value = parseInt(this.$.value);
|
|
132
133
|
break;
|
|
133
|
-
case
|
|
134
|
+
case 21:
|
|
134
135
|
|
|
135
136
|
const result = {defs: {rels: s.rels, codes: s.codes}, exp: $$[$0-1]};
|
|
136
137
|
// console.log(JSON.stringify(result, "", 2));
|
|
@@ -138,73 +139,76 @@ case 20:
|
|
|
138
139
|
return result;
|
|
139
140
|
|
|
140
141
|
break;
|
|
141
|
-
case
|
|
142
|
+
case 22:
|
|
143
|
+
s = new SymbolTable();
|
|
144
|
+
break;
|
|
145
|
+
case 23: case 24:
|
|
142
146
|
|
|
143
147
|
break;
|
|
144
|
-
case
|
|
148
|
+
case 25:
|
|
145
149
|
s.add_rel($$[$0-3].value,$$[$0-1]);
|
|
146
150
|
break;
|
|
147
|
-
case
|
|
151
|
+
case 26:
|
|
148
152
|
s.add_code($$[$0-3].value,$$[$0-1]);
|
|
149
153
|
break;
|
|
150
|
-
case
|
|
154
|
+
case 27:
|
|
151
155
|
this.$ = { code: "ref", ref: $$[$0].value, start: $$[$0].start, end: $$[$0].end};
|
|
152
156
|
break;
|
|
153
|
-
case
|
|
157
|
+
case 28: case 59: case 77: case 87:
|
|
154
158
|
this.$ = $$[$0];
|
|
155
159
|
break;
|
|
156
|
-
case
|
|
160
|
+
case 29:
|
|
157
161
|
this.$ = { code: "product", product: $$[$0-1], start: $$[$0-2].start, end: $$[$0].end };
|
|
158
162
|
break;
|
|
159
|
-
case
|
|
163
|
+
case 30:
|
|
160
164
|
this.$ = { code: "vector", vector: s.as_ref($$[$0-1]), start: $$[$0-2].start, end: $$[$0].end };
|
|
161
165
|
break;
|
|
162
|
-
case
|
|
166
|
+
case 31:
|
|
163
167
|
this.$ = { code: "union", union: $$[$0-1], start: $$[$0-2].start, end: $$[$0].end };
|
|
164
168
|
break;
|
|
165
|
-
case
|
|
169
|
+
case 32:
|
|
166
170
|
this.$ = {};
|
|
167
171
|
break;
|
|
168
|
-
case
|
|
172
|
+
case 33:
|
|
169
173
|
this.$ = $$[$0].reduce((r, lc) => {
|
|
170
174
|
r[lc.label] = s.as_ref(lc.code);
|
|
171
175
|
return r }
|
|
172
176
|
, {});
|
|
173
177
|
break;
|
|
174
|
-
case
|
|
178
|
+
case 34: case 50: case 88:
|
|
175
179
|
this.$ = [$$[$0]];
|
|
176
180
|
break;
|
|
177
|
-
case
|
|
181
|
+
case 35: case 51: case 89:
|
|
178
182
|
this.$ = [].concat($$[$0-2],$$[$0]);
|
|
179
183
|
break;
|
|
180
|
-
case
|
|
184
|
+
case 36: case 37: case 38:
|
|
181
185
|
this.$ = {label: $$[$0].value, code: $$[$0-1]};
|
|
182
186
|
break;
|
|
183
|
-
case
|
|
187
|
+
case 39: case 40: case 41:
|
|
184
188
|
this.$ = {label: $$[$0-2].value, code: $$[$0]};
|
|
185
189
|
break;
|
|
186
|
-
case
|
|
190
|
+
case 42:
|
|
187
191
|
this.$ = { type: "name", name: $$[$0].value, start: $$[$0].start, end: $$[$0].end};
|
|
188
192
|
break;
|
|
189
|
-
case
|
|
193
|
+
case 43:
|
|
190
194
|
this.$ = { type: "code", code: s.as_ref($$[$0]), start: $$[$0-1].start, end: $$[$0].end};
|
|
191
195
|
break;
|
|
192
|
-
case
|
|
196
|
+
case 44:
|
|
193
197
|
this.$ = { open: $$[$0-1].open, fields: $$[$0-1].fields, start: $$[$0-2].start, end: $$[$0].end};
|
|
194
198
|
break;
|
|
195
|
-
case
|
|
199
|
+
case 45:
|
|
196
200
|
this.$ = { type: "union", open: $$[$0-1].open, fields: $$[$0-1].fields, start: $$[$0-2].start, end: $$[$0].end};
|
|
197
201
|
break;
|
|
198
|
-
case
|
|
202
|
+
case 46:
|
|
199
203
|
this.$ = { type: "product", open: $$[$0-1].open, fields: $$[$0-1].fields, start: $$[$0-2].start, end: $$[$0].end};
|
|
200
204
|
break;
|
|
201
|
-
case
|
|
205
|
+
case 47:
|
|
202
206
|
this.$ = { type: "vector", vector: $$[$0-1], start: $$[$0-2].start, end: $$[$0].end };
|
|
203
207
|
break;
|
|
204
|
-
case
|
|
208
|
+
case 48:
|
|
205
209
|
this.$ = { fields: {}};
|
|
206
210
|
break;
|
|
207
|
-
case
|
|
211
|
+
case 49:
|
|
208
212
|
this.$ = $$[$0].reduce((r, lc) => {
|
|
209
213
|
if (lc.dots) {
|
|
210
214
|
r.open = true;
|
|
@@ -214,79 +218,79 @@ case 46:
|
|
|
214
218
|
return r }
|
|
215
219
|
, { fields: {} });
|
|
216
220
|
break;
|
|
217
|
-
case
|
|
221
|
+
case 52:
|
|
218
222
|
this.$ = {dots: true };
|
|
219
223
|
break;
|
|
220
|
-
case
|
|
224
|
+
case 53: case 54: case 55:
|
|
221
225
|
this.$ = {label: $$[$0].value, filter: $$[$0-1]};
|
|
222
226
|
break;
|
|
223
|
-
case
|
|
227
|
+
case 56: case 57: case 58:
|
|
224
228
|
this.$ = {label: $$[$0-2].value, filter: $$[$0]};
|
|
225
229
|
break;
|
|
226
|
-
case
|
|
227
|
-
this.$ = {...
|
|
230
|
+
case 60:
|
|
231
|
+
this.$ = {...comp($$[$0-1], $$[$0]), start: $$[$0-1].start, end:$$[$0].end};
|
|
228
232
|
break;
|
|
229
|
-
case
|
|
233
|
+
case 61:
|
|
230
234
|
this.$ = {op: 'caret', caret: $$[$0-1], start: $$[$0-1].start, end:$$[$0].end};
|
|
231
235
|
break;
|
|
232
|
-
case
|
|
236
|
+
case 62:
|
|
233
237
|
this.$ = {...$$[$0-1], start: $$[$0-2].start, end: $$[$0].end};
|
|
234
238
|
break;
|
|
235
|
-
case
|
|
239
|
+
case 63:
|
|
236
240
|
this.$ = {op: "vector", vector: $$[$0-1], start: $$[$0-2].start, end: $$[$0].end};
|
|
237
241
|
break;
|
|
238
|
-
case
|
|
239
|
-
this.$ = {...
|
|
242
|
+
case 64:
|
|
243
|
+
this.$ = {...union($$[$0-1]), start: $$[$0-2].start, end: $$[$0].end};
|
|
240
244
|
break;
|
|
241
|
-
case
|
|
245
|
+
case 65:
|
|
242
246
|
this.$ = {op: "ref", ref: $$[$0].value, start: $$[$0].start, end: $$[$0].end};
|
|
243
247
|
break;
|
|
244
|
-
case
|
|
245
|
-
this.$ = {...
|
|
248
|
+
case 66:
|
|
249
|
+
this.$ = {...identity, start: $$[$0-1].start, end: $$[$0].end};
|
|
246
250
|
break;
|
|
247
|
-
case
|
|
251
|
+
case 67:
|
|
248
252
|
this.$ = {...$$[$0-1], start: $$[$0-2].start, end: $$[$0].end };
|
|
249
253
|
break;
|
|
250
|
-
case
|
|
254
|
+
case 68:
|
|
251
255
|
this.$ = {op: "str", str: $$[$0].value, start: $$[$0].start, end: $$[$0].end };
|
|
252
256
|
break;
|
|
253
|
-
case
|
|
257
|
+
case 69:
|
|
254
258
|
this.$ = {op: "int", int: $$[$0].value, start: $$[$0].start, end: $$[$0].end };
|
|
255
259
|
break;
|
|
256
|
-
case
|
|
260
|
+
case 70: case 71: case 72:
|
|
257
261
|
this.$ = {op: "dot", dot: $$[$0].value, start: $$[$0-1].start, end: $$[$0].end };
|
|
258
262
|
break;
|
|
259
|
-
case
|
|
263
|
+
case 73:
|
|
260
264
|
this.$ = {op: "code", code: s.as_ref($$[$0]), start: $$[$0-1].start, end: $$[$0].end};
|
|
261
265
|
break;
|
|
262
|
-
case
|
|
266
|
+
case 74:
|
|
263
267
|
this.$ = {op: "filter", filter: $$[$0], start: $$[$0-1].start, end:$$[$0].end};
|
|
264
268
|
break;
|
|
265
|
-
case
|
|
269
|
+
case 75:
|
|
266
270
|
this.$ = {op: "pipe", start: $$[$0].start, end: $$[$0].end};
|
|
267
271
|
break;
|
|
268
|
-
case
|
|
272
|
+
case 76:
|
|
269
273
|
this.$ = {op: "product", product: []};
|
|
270
274
|
break;
|
|
271
|
-
case
|
|
275
|
+
case 78:
|
|
272
276
|
this.$ = {op: "product", product: [$$[$0]]};
|
|
273
277
|
break;
|
|
274
|
-
case
|
|
278
|
+
case 79:
|
|
275
279
|
$$[$0-2].product = [].concat($$[$0-2].product,$$[$0]); this.$ = $$[$0-2];
|
|
276
280
|
break;
|
|
277
|
-
case
|
|
281
|
+
case 80: case 81: case 82:
|
|
278
282
|
this.$ = {label: $$[$0].value, exp: $$[$0-1]};
|
|
279
283
|
break;
|
|
280
|
-
case
|
|
284
|
+
case 83: case 84: case 85:
|
|
281
285
|
this.$ = {label: $$[$0-2].value, exp: $$[$0]};
|
|
282
286
|
break;
|
|
283
|
-
case
|
|
287
|
+
case 86:
|
|
284
288
|
this.$ = [];
|
|
285
289
|
break;
|
|
286
290
|
}
|
|
287
291
|
},
|
|
288
|
-
table: [o($V0,[2,
|
|
289
|
-
defaultActions: {
|
|
292
|
+
table: [o($V0,[2,22],{43:1,44:2,41:3,42:[1,4]}),{1:[3]},o($V0,[2,24],{45:5}),o($V0,[2,23]),o($V0,[2,20]),{3:7,4:$V1,5:16,6:$V2,7:17,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,29:18,30:$V8,37:8,38:$V9,39:19,40:$Va,46:6,57:9,61:$Vb},{3:32,4:$V1,5:16,6:$V2,7:17,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,47:[1,29],57:30,58:$Vc,61:$Vb},o($Vd,$Ve,{25:34,26:$Vf}),{3:36,4:$V1,9:41,10:$V4,11:39,12:$V5,13:40,14:$V6,48:38,49:37},o($Vg,[2,59]),o([4,6,8,10,12,14,16,18,20,22,24,26,30,32,34,36,38,40,47,58,61],[2,1]),o([4,10,12,14],[2,18]),{3:46,4:$V1,5:47,6:$V2,7:48,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,20:[2,76],29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:45,57:9,59:42,61:$Vb,62:43,63:44},{3:32,4:$V1,5:16,6:$V2,7:17,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,22:$Vh,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:51,57:9,60:49,61:$Vb,64:50},{3:32,4:$V1,5:16,6:$V2,7:17,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,18:$Vh,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:51,57:9,60:52,61:$Vb,64:50},{3:32,4:$V1,5:16,6:$V2,7:17,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,23:53,24:$Vi,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:54,57:9,61:$Vb},o($Vg,$Vj),o($Vg,$Vk),{3:58,4:$V1,5:57,6:$V2,7:56,8:$V3},{3:60,4:$V1,9:63,10:$V4,11:64,12:$V5,13:65,14:$V6,15:62,16:$V7,37:61,38:$V9,53:59},o($Vg,[2,75]),o([4,6,8,10,12,14,16,20,28,30,38,40,61],[2,5]),o([4,6,8,10,12,14,16,22,30,38,40,61],[2,6]),o([4,6,8,10,12,14,16,18,28,30,38,40,61],[2,4]),o([4,6,8,10,12,14,16,24,28,30,38,40,61],[2,7]),o($Vl,[2,2]),o($Vl,[2,3]),o($Vm,[2,14]),o([4,10,12,14,16,38],[2,19]),{1:[2,21]},o($Vg,[2,60]),o($Vg,[2,61]),o($Vg,$Ve),{3:66,4:$V1,9:41,10:$V4,11:39,12:$V5,13:40,14:$V6,48:38,49:37},{3:32,4:$V1,5:16,6:$V2,7:17,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:67,57:9,61:$Vb},o($V0,[2,12]),o($Vd,$Vn,{25:68,26:$Vf}),o($Vg,[2,73]),o($Vg,[2,28]),{3:73,4:$V1,5:74,6:$V2,7:75,8:$V3,9:41,10:$V4,11:39,12:$V5,13:40,14:$V6,20:$Vo,48:38,49:72,50:69,51:70,52:71},{3:66,4:$V1,9:41,10:$V4,11:39,12:$V5,13:40,14:$V6,48:38,49:76},{3:73,4:$V1,5:74,6:$V2,7:75,8:$V3,9:41,10:$V4,11:39,12:$V5,13:40,14:$V6,18:$Vo,48:38,49:72,50:77,51:70,52:71},{19:78,20:$Vp},{20:[2,77],31:80,32:$Vq},o($Vr,[2,78]),{3:82,4:$V1,5:83,6:$V2,7:84,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,57:30,58:$Vc,61:$Vb},o($Vs,$Ve,{35:85,36:$Vt}),o($Vs,$Vj,{35:87,36:$Vt}),o($Vs,$Vk,{35:88,36:$Vt}),{21:89,22:$Vu},o([18,22],[2,87],{31:91,32:$Vq}),o($Vv,[2,88],{11:12,13:13,9:14,15:15,5:16,7:17,29:18,39:19,57:30,3:32,37:33,4:$V1,6:$V2,8:$V3,10:$V4,12:$V5,14:$V6,16:$V7,30:$V8,38:$V9,40:$Va,58:$Vc,61:$Vb}),{17:92,18:$Vw},o($Vg,[2,66]),{3:32,4:$V1,5:16,6:$V2,7:17,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,23:94,24:$Vi,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,57:30,58:$Vc,61:$Vb},o($Vg,[2,11]),o($Vg,[2,70]),o($Vg,[2,71]),o($Vg,[2,72]),o($Vg,[2,74]),o($Vg,$Vx),{3:66,4:$V1,9:41,10:$V4,11:39,12:$V5,13:40,14:$V6,48:38,49:95},{3:101,4:$V1,5:102,6:$V2,7:103,8:$V3,9:63,10:$V4,11:64,12:$V5,13:65,14:$V6,15:62,16:$V7,24:$Vy,27:99,28:$Vz,37:61,38:$V9,53:100,54:96,55:97,56:98},{3:101,4:$V1,5:102,6:$V2,7:103,8:$V3,9:63,10:$V4,11:64,12:$V5,13:65,14:$V6,15:62,16:$V7,18:$Vy,27:99,28:$Vz,37:61,38:$V9,53:100,54:105,55:97,56:98},{3:101,4:$V1,5:102,6:$V2,7:103,8:$V3,9:63,10:$V4,11:64,12:$V5,13:65,14:$V6,15:62,16:$V7,20:$Vy,27:99,28:$Vz,37:61,38:$V9,53:100,54:106,55:97,56:98},{3:60,4:$V1,9:63,10:$V4,11:64,12:$V5,13:65,14:$V6,15:62,16:$V7,37:61,38:$V9,53:107},o($Vg,$Vn),{3:32,4:$V1,5:16,6:$V2,7:17,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,29:18,30:$V8,33:108,34:[1,109],37:33,38:$V9,39:19,40:$Va,57:30,58:$Vc,61:$Vb},{9:41,10:$V4,11:39,12:$V5,13:40,14:$V6,48:110},{19:111,20:$Vp},o([18,20],[2,33],{31:112,32:$Vq}),o($VA,[2,34]),{3:113,4:$V1,5:114,6:$V2,7:115,8:$V3},o($Vm,$Vn,{35:116,36:$Vt}),{35:117,36:$Vt},{35:118,36:$Vt},{21:119,22:$Vu},{17:120,18:$Vw},o($Vg,[2,62]),o($Vg,[2,9]),{3:46,4:$V1,5:47,6:$V2,7:48,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:45,57:9,61:$Vb,63:121},o([4,6,8,10,12,14,16,28,30,38,40,61],[2,15]),o($Vs,$Ve,{20:$VB,32:$VB}),o($Vs,$Vj,{20:$VC,32:$VC}),o($Vs,$Vk,{20:$VD,32:$VD}),{3:32,4:$V1,5:16,6:$V2,7:17,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:122,57:9,61:$Vb},o($V0,[2,17]),{3:32,4:$V1,5:16,6:$V2,7:17,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:123,57:9,61:$Vb},{3:32,4:$V1,5:16,6:$V2,7:17,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:124,57:9,61:$Vb},o($Vg,[2,63]),o($Vg,[2,10]),{3:32,4:$V1,5:16,6:$V2,7:17,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:125,57:9,61:$Vb},o($Vg,[2,64]),o($Vg,[2,8]),o($Vg,[2,67]),o($Vg,[2,43]),{23:126,24:$Vi},o([18,20,24],[2,49],{31:127,32:$Vq}),o($VE,[2,50]),o($VE,[2,52]),{3:128,4:$V1,5:129,6:$V2,7:130,8:$V3},o($Vm,$Vx,{35:131,36:$Vt}),{35:132,36:$Vt},{35:133,36:$Vt},o($VE,[2,13]),{17:134,18:$Vw},{19:135,20:$Vp},{21:136,22:$Vu},o($V0,[2,25]),o($V0,[2,16]),{34:[1,137]},o($Vg,[2,29]),{3:73,4:$V1,5:74,6:$V2,7:75,8:$V3,9:41,10:$V4,11:39,12:$V5,13:40,14:$V6,48:38,49:72,52:138},o($VA,[2,36]),o($VA,[2,37]),o($VA,[2,38]),{3:66,4:$V1,9:41,10:$V4,11:39,12:$V5,13:40,14:$V6,48:38,49:139},{3:66,4:$V1,9:41,10:$V4,11:39,12:$V5,13:40,14:$V6,48:38,49:140},{3:66,4:$V1,9:41,10:$V4,11:39,12:$V5,13:40,14:$V6,48:38,49:141},o($Vg,[2,30]),o($Vg,[2,31]),o($Vr,[2,79]),o($Vr,[2,83],{11:12,13:13,9:14,15:15,5:16,7:17,29:18,39:19,57:30,3:32,37:33,4:$V1,6:$V2,8:$V3,10:$V4,12:$V5,14:$V6,16:$V7,30:$V8,38:$V9,40:$Va,58:$Vc,61:$Vb}),o($Vr,[2,84],{11:12,13:13,9:14,15:15,5:16,7:17,29:18,39:19,57:30,3:32,37:33,4:$V1,6:$V2,8:$V3,10:$V4,12:$V5,14:$V6,16:$V7,30:$V8,38:$V9,40:$Va,58:$Vc,61:$Vb}),o($Vr,[2,85],{11:12,13:13,9:14,15:15,5:16,7:17,29:18,39:19,57:30,3:32,37:33,4:$V1,6:$V2,8:$V3,10:$V4,12:$V5,14:$V6,16:$V7,30:$V8,38:$V9,40:$Va,58:$Vc,61:$Vb}),o($Vv,[2,89],{11:12,13:13,9:14,15:15,5:16,7:17,29:18,39:19,57:30,3:32,37:33,4:$V1,6:$V2,8:$V3,10:$V4,12:$V5,14:$V6,16:$V7,30:$V8,38:$V9,40:$Va,58:$Vc,61:$Vb}),o($Vg,[2,44]),{3:101,4:$V1,5:102,6:$V2,7:103,8:$V3,9:63,10:$V4,11:64,12:$V5,13:65,14:$V6,15:62,16:$V7,27:99,28:$Vz,37:61,38:$V9,53:100,56:142},o($VE,[2,53]),o($VE,[2,54]),o($VE,[2,55]),{3:60,4:$V1,9:63,10:$V4,11:64,12:$V5,13:65,14:$V6,15:62,16:$V7,37:61,38:$V9,53:143},{3:60,4:$V1,9:63,10:$V4,11:64,12:$V5,13:65,14:$V6,15:62,16:$V7,37:61,38:$V9,53:144},{3:60,4:$V1,9:63,10:$V4,11:64,12:$V5,13:65,14:$V6,15:62,16:$V7,37:61,38:$V9,53:145},o($Vg,[2,45]),o($Vg,[2,46]),o($Vg,[2,47]),o($V0,[2,26]),o($VA,[2,35]),o($VA,[2,39]),o($VA,[2,40]),o($VA,[2,41]),o($VE,[2,51]),o($VE,[2,56]),o($VE,[2,57]),o($VE,[2,58])],
|
|
293
|
+
defaultActions: {29:[2,21]},
|
|
290
294
|
parseError: function parseError (str, hash) {
|
|
291
295
|
if (hash.recoverable) {
|
|
292
296
|
this.trace(str);
|
|
@@ -798,9 +802,9 @@ case 17:return 38;
|
|
|
798
802
|
break;
|
|
799
803
|
case 18:return 40;
|
|
800
804
|
break;
|
|
801
|
-
case 19:return
|
|
805
|
+
case 19:return 61;
|
|
802
806
|
break;
|
|
803
|
-
case 20:return
|
|
807
|
+
case 20:return 58;
|
|
804
808
|
break;
|
|
805
809
|
case 21:return 6;
|
|
806
810
|
break;
|
|
@@ -808,12 +812,14 @@ case 22:return 4;
|
|
|
808
812
|
break;
|
|
809
813
|
case 23:return 8;
|
|
810
814
|
break;
|
|
811
|
-
case 24:return
|
|
815
|
+
case 24:return 42;
|
|
816
|
+
break;
|
|
817
|
+
case 25:return 47;
|
|
812
818
|
break;
|
|
813
819
|
}
|
|
814
820
|
},
|
|
815
|
-
rules: [/^(?:[/][*]([*][^/]|[^*])*[*][/])/,/^(?:(\/\/|#|%|--)[^\n]*)/,/^(?:\s+)/,/^(?:<)/,/^(?:\{)/,/^(?:\[)/,/^(?:\()/,/^(?:>)/,/^(?:\})/,/^(?:\])/,/^(?:\))/,/^(?:=)/,/^(?:\.\.\.)/,/^(?:\.)/,/^(?:,)/,/^(?:;)/,/^(?::)/,/^(?:\$)/,/^(?:\?)/,/^(?:\|)/,/^(?:\^)/,/^(?:"([^"\\]|\\(.|\n))*"|'([^'\\]|\\(.|\n))*')/,/^(?:[a-zA-Z_][a-zA-Z0-9_?!]*)/,/^(?:0|[-]?[1-9][0-9]*)/,/^(?:$)/],
|
|
816
|
-
conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],"inclusive":true}}
|
|
821
|
+
rules: [/^(?:[/][*]([*][^/]|[^*])*[*][/])/,/^(?:(\/\/|#|%|--)[^\n]*)/,/^(?:\s+)/,/^(?:<)/,/^(?:\{)/,/^(?:\[)/,/^(?:\()/,/^(?:>)/,/^(?:\})/,/^(?:\])/,/^(?:\))/,/^(?:=)/,/^(?:\.\.\.)/,/^(?:\.)/,/^(?:,)/,/^(?:;)/,/^(?::)/,/^(?:\$)/,/^(?:\?)/,/^(?:\|)/,/^(?:\^)/,/^(?:"([^"\\]|\\(.|\n))*"|'([^'\\]|\\(.|\n))*')/,/^(?:[a-zA-Z_][a-zA-Z0-9_?!]*)/,/^(?:0|[-]?[1-9][0-9]*)/,/^(?:\+\+\+)/,/^(?:$)/],
|
|
822
|
+
conditions: {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],"inclusive":true}}
|
|
817
823
|
});
|
|
818
824
|
return lexer;
|
|
819
825
|
})();
|