@fraczak/k 5.0.2 → 5.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/TODO.md +36 -1
- package/codes.mjs +5 -1
- package/hash.mjs +1 -1
- package/package.json +1 -1
- package/parser.jison +3 -1
- package/parser.mjs +62 -57
package/TODO.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# To do list for canonical names
|
|
2
2
|
|
|
3
3
|
- [ ] Write a script to search for conflicting names
|
|
4
|
-
- [
|
|
4
|
+
- [*] Export a relation. i.e., rewrite it as a list of all
|
|
5
5
|
dependency definitions using canonical names
|
|
6
6
|
- [ ] Find a way of adding 'comments' or some way of 'tagging' the definitions
|
|
7
7
|
- [X] The definitions should be simplied by removing useless filters
|
|
@@ -16,3 +16,38 @@ filters corresponding to the patterns. [DONE]
|
|
|
16
16
|
|
|
17
17
|
The filer variables have to be renamed for normalization if they take part of
|
|
18
18
|
the canonical name calculation. [DONE]
|
|
19
|
+
|
|
20
|
+
## DESER
|
|
21
|
+
|
|
22
|
+
Serialization and deserialization of values.
|
|
23
|
+
|
|
24
|
+
### Can we define byte-array via prefix-free codes?
|
|
25
|
+
|
|
26
|
+
### Non prefix-free de/serialization
|
|
27
|
+
|
|
28
|
+
How programatically change encoding of a value? Is it possible to add some
|
|
29
|
+
annotations on the type graph?
|
|
30
|
+
|
|
31
|
+
Maybe it belongs to "execution environment", e.g., `k --deser JSON`,
|
|
32
|
+
`k --deser AVRO/UTF8`, where `JSON`, `AVRO`, `UTF8` are provided
|
|
33
|
+
by some external spec?
|
|
34
|
+
|
|
35
|
+
E.g.:
|
|
36
|
+
|
|
37
|
+
```DESER:
|
|
38
|
+
$ BsAqRMv = < BsAqRMv 0, BsAqRMv 1, KL _ >; -- $C0=<C0"0",C0"1",C1"_">;$C1={};
|
|
39
|
+
|
|
40
|
+
$ bnat = < {} _ @as '', bnat 0 @as '0' , bnat 1 >;
|
|
41
|
+
::UTF8::
|
|
42
|
+
{{} _} => ()
|
|
43
|
+
{$bnat 0} => \u2602
|
|
44
|
+
|
|
45
|
+
Ok, it looks for me like what we need is the "Monad", i.e., a set of
|
|
46
|
+
functions with side-effects (like `_log!`).
|
|
47
|
+
Get straight, we have `write_0!`, `write_1!`, `read_0!`, and `read_1!`,
|
|
48
|
+
or whatever is supported by the target.
|
|
49
|
+
|
|
50
|
+
#### How to implement `JSON`?
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
package/codes.mjs
CHANGED
|
@@ -103,6 +103,7 @@ function minimize(codes) {
|
|
|
103
103
|
for (const name1 in classes) {
|
|
104
104
|
const [eq_names, dif_names] = classes[name1].reduce(
|
|
105
105
|
([eq_names, dif_names], name2) => {
|
|
106
|
+
// console.log(JSON.stringify({classes,codes,representatives,name1,name2},null,2));
|
|
106
107
|
if (are_different(classes, representatives, name1, name2, codes)) {
|
|
107
108
|
dif_names.push(name2);
|
|
108
109
|
} else {
|
|
@@ -152,6 +153,9 @@ function normalizeAll(codes, representatives) {
|
|
|
152
153
|
...code,
|
|
153
154
|
vector: representatives[code.vector] || code.vector,
|
|
154
155
|
};
|
|
156
|
+
break;
|
|
157
|
+
default:
|
|
158
|
+
throw new Error(`Unexpected code ${code.code}`);
|
|
155
159
|
}
|
|
156
160
|
}
|
|
157
161
|
|
|
@@ -190,7 +194,7 @@ function finalize(codes) {
|
|
|
190
194
|
}
|
|
191
195
|
|
|
192
196
|
function register(newCodes) {
|
|
193
|
-
const { codes, representatives } = finalize( {...
|
|
197
|
+
const { codes, representatives } = finalize( {...theRepository.codes,...newCodes});
|
|
194
198
|
const reps = Object.values(representatives).reduce((reps,rep) =>
|
|
195
199
|
({...reps, [rep]:rep})
|
|
196
200
|
, {});
|
package/hash.mjs
CHANGED
package/package.json
CHANGED
package/parser.jison
CHANGED
|
@@ -63,6 +63,7 @@ function fromEscString(escString) {
|
|
|
63
63
|
"?" return 'QMARK';
|
|
64
64
|
"|" return 'PIPE';
|
|
65
65
|
"^" return 'CARET';
|
|
66
|
+
"@" return 'AT';
|
|
66
67
|
\"([^"\\]|\\(.|\n))*\"|\'([^'\\]|\\(.|\n))*\' return 'STRING';
|
|
67
68
|
[a-zA-Z_][a-zA-Z0-9_?!]* return 'NAME';
|
|
68
69
|
0|[-]?[1-9][0-9]* return 'INT';
|
|
@@ -72,7 +73,7 @@ function fromEscString(escString) {
|
|
|
72
73
|
/lex
|
|
73
74
|
|
|
74
75
|
%token NAME STRING INT
|
|
75
|
-
%token LA LC LB LP RA RP RB RC EQ DOT COMMA SC COL DOLLAR PIPE CARET QMARK DOTS
|
|
76
|
+
%token LA LC LB LP RA RP RB RC EQ DOT COMMA SC COL DOLLAR PIPE CARET AT QMARK DOTS
|
|
76
77
|
%token EOF
|
|
77
78
|
|
|
78
79
|
%start input_with_eof
|
|
@@ -119,6 +120,7 @@ defs: { }
|
|
|
119
120
|
|
|
120
121
|
code
|
|
121
122
|
: name { $$ = { code: "ref", ref: $1.value, start: $1.start, end: $1.end}; }
|
|
123
|
+
| AT name { $$ = { code: "ref", ref: "@" + $2.value, start: $1.start, end: $2.end}; }
|
|
122
124
|
| codeDef { $$ = $1; }
|
|
123
125
|
;
|
|
124
126
|
|
package/parser.mjs
CHANGED
|
@@ -115,12 +115,12 @@ function fromEscString(escString) {
|
|
|
115
115
|
|
|
116
116
|
|
|
117
117
|
var parser = (function(){
|
|
118
|
-
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,
|
|
118
|
+
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,63],$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,60,63],$Ve=[2,68],$Vf=[1,35],$Vg=[1,38],$Vh=[4,6,8,10,12,14,16,18,20,22,24,30,32,34,38,40,47,60,63],$Vi=[2,89],$Vj=[1,56],$Vk=[2,71],$Vl=[2,72],$Vm=[4,6,8,10,12,14,16,18,20,22,24,30,32,34,36,38,40,47,60,63],$Vn=[4,6,8],$Vo=[2,27],$Vp=[4,6,8,10,12,14,16,18,20,22,24,26,30,32,34,38,40,47,60,63],$Vq=[2,33],$Vr=[1,82],$Vs=[1,84],$Vt=[20,32],$Vu=[4,6,8,10,12,14,16,30,38,40,60,63],$Vv=[1,89],$Vw=[1,93],$Vx=[18,22,32],$Vy=[1,96],$Vz=[2,50],$VA=[2,51],$VB=[1,108],$VC=[18,20,32],$VD=[2,83],$VE=[2,84],$VF=[2,85],$VG=[18,20,24,32];
|
|
119
119
|
var parser = {trace: function trace () { },
|
|
120
120
|
yy: {},
|
|
121
|
-
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,"
|
|
122
|
-
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",
|
|
123
|
-
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],[
|
|
121
|
+
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,"AT":50,"labelled_codes":51,"non_empty_labelled_codes":52,"code_label":53,"filter_":54,"labelled_filters":55,"filter":56,"non_empty_labelled_filters":57,"filter_label":58,"exp":59,"CARET":60,"labelled":61,"list":62,"PIPE":63,"non_empty_labelled":64,"comp_label":65,"non_empty_list":66,"$accept":0,"$end":1},
|
|
122
|
+
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",50:"AT",60:"CARET",63:"PIPE"},
|
|
123
|
+
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,2],[49,1],[48,3],[48,3],[48,3],[51,0],[51,1],[52,1],[52,3],[53,2],[53,2],[53,2],[53,3],[53,3],[53,3],[54,2],[54,3],[54,3],[54,3],[54,3],[56,1],[56,3],[56,1],[55,0],[55,1],[57,1],[57,3],[58,1],[58,2],[58,2],[58,2],[58,3],[58,3],[58,3],[46,1],[46,2],[46,2],[59,3],[59,3],[59,3],[59,1],[59,2],[59,3],[59,1],[59,1],[59,2],[59,2],[59,2],[59,2],[59,2],[59,1],[61,0],[61,1],[64,1],[64,3],[65,2],[65,2],[65,2],[65,3],[65,3],[65,3],[62,0],[62,1],[66,1],[66,3]],
|
|
124
124
|
performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) {
|
|
125
125
|
/* this == yyval */
|
|
126
126
|
|
|
@@ -158,25 +158,28 @@ break;
|
|
|
158
158
|
case 27:
|
|
159
159
|
this.$ = { code: "ref", ref: $$[$0].value, start: $$[$0].start, end: $$[$0].end};
|
|
160
160
|
break;
|
|
161
|
-
case 28:
|
|
161
|
+
case 28:
|
|
162
|
+
this.$ = { code: "ref", ref: "@" + $$[$0].value, start: $$[$0-1].start, end: $$[$0].end};
|
|
163
|
+
break;
|
|
164
|
+
case 29: case 48: case 62: case 90:
|
|
162
165
|
this.$ = $$[$0];
|
|
163
166
|
break;
|
|
164
|
-
case
|
|
167
|
+
case 30:
|
|
165
168
|
if (Object.keys($$[$0-1]).length == 1)
|
|
166
169
|
this.$ = { code: "union", union: $$[$0-1], start: $$[$0-2].start, end: $$[$0].end };
|
|
167
170
|
else
|
|
168
171
|
this.$ = { code: "product", product: $$[$0-1], start: $$[$0-2].start, end: $$[$0].end };
|
|
169
172
|
break;
|
|
170
|
-
case
|
|
173
|
+
case 31:
|
|
171
174
|
this.$ = { code: "vector", vector: s.as_ref($$[$0-1]), start: $$[$0-2].start, end: $$[$0].end };
|
|
172
175
|
break;
|
|
173
|
-
case
|
|
176
|
+
case 32:
|
|
174
177
|
this.$ = { code: "union", union: $$[$0-1], start: $$[$0-2].start, end: $$[$0].end };
|
|
175
178
|
break;
|
|
176
|
-
case
|
|
179
|
+
case 33:
|
|
177
180
|
this.$ = {};
|
|
178
181
|
break;
|
|
179
|
-
case
|
|
182
|
+
case 34:
|
|
180
183
|
this.$ = $$[$0].reduce((r, lc) => {
|
|
181
184
|
if (r[lc.label])
|
|
182
185
|
anError(this._$,`Duplicate label '${lc.label}'.`);
|
|
@@ -184,49 +187,49 @@ case 33:
|
|
|
184
187
|
return r }
|
|
185
188
|
, {});
|
|
186
189
|
break;
|
|
187
|
-
case
|
|
190
|
+
case 35: case 53: case 91:
|
|
188
191
|
this.$ = [$$[$0]];
|
|
189
192
|
break;
|
|
190
|
-
case
|
|
193
|
+
case 36: case 54: case 92:
|
|
191
194
|
this.$ = [].concat($$[$0-2],$$[$0]);
|
|
192
195
|
break;
|
|
193
|
-
case
|
|
196
|
+
case 37: case 38: case 39:
|
|
194
197
|
this.$ = {label: $$[$0].value, code: $$[$0-1]};
|
|
195
198
|
break;
|
|
196
|
-
case
|
|
199
|
+
case 40: case 41: case 42:
|
|
197
200
|
this.$ = {label: $$[$0-2].value, code: $$[$0]};
|
|
198
201
|
break;
|
|
199
|
-
case
|
|
202
|
+
case 43:
|
|
200
203
|
this.$ = { type: "code", code: s.as_ref($$[$0]), start: $$[$0-1].start, end: $$[$0].end};
|
|
201
204
|
break;
|
|
202
|
-
case
|
|
205
|
+
case 44:
|
|
203
206
|
if ( !$$[$0-1].open && (Object.keys($$[$0-1].fields).length == 1))
|
|
204
207
|
this.$ = { type: "union", open: $$[$0-1].open, fields: $$[$0-1].fields, start: $$[$0-2].start, end: $$[$0].end};
|
|
205
208
|
else
|
|
206
209
|
this.$ = { type: null, open: $$[$0-1].open, fields: $$[$0-1].fields, start: $$[$0-2].start, end: $$[$0].end};
|
|
207
210
|
break;
|
|
208
|
-
case
|
|
211
|
+
case 45:
|
|
209
212
|
this.$ = { type: "union", open: $$[$0-1].open, fields: $$[$0-1].fields, start: $$[$0-2].start, end: $$[$0].end};
|
|
210
213
|
break;
|
|
211
|
-
case
|
|
214
|
+
case 46:
|
|
212
215
|
if ( !$$[$0-1].open && (Object.keys($$[$0-1].fields).length == 1))
|
|
213
216
|
this.$ = { type: "union", open: $$[$0-1].open, fields: $$[$0-1].fields, start: $$[$0-2].start, end: $$[$0].end};
|
|
214
217
|
else
|
|
215
218
|
this.$ = { type: "product", open: $$[$0-1].open, fields: $$[$0-1].fields, start: $$[$0-2].start, end: $$[$0].end};
|
|
216
219
|
break;
|
|
217
|
-
case
|
|
220
|
+
case 47:
|
|
218
221
|
this.$ = { type: "vector", vector: $$[$0-1], start: $$[$0-2].start, end: $$[$0].end };
|
|
219
222
|
break;
|
|
220
|
-
case
|
|
223
|
+
case 49:
|
|
221
224
|
this.$ = { name: $$[$0].value, ...$$[$0-2], start: $$[$0-2].start, end: $$[$0].end };
|
|
222
225
|
break;
|
|
223
|
-
case
|
|
226
|
+
case 50:
|
|
224
227
|
this.$ = { type: 'name', name: $$[$0].value, open: true, start: $$[$0].start, end: $$[$0].end};
|
|
225
228
|
break;
|
|
226
|
-
case
|
|
229
|
+
case 51:
|
|
227
230
|
this.$ = { fields: {}};
|
|
228
231
|
break;
|
|
229
|
-
case
|
|
232
|
+
case 52:
|
|
230
233
|
this.$ = $$[$0].reduce((r, lc) => {
|
|
231
234
|
if (lc.dots) {
|
|
232
235
|
r.open = true;
|
|
@@ -238,61 +241,61 @@ case 51:
|
|
|
238
241
|
return r }
|
|
239
242
|
, { fields: {} });
|
|
240
243
|
break;
|
|
241
|
-
case
|
|
244
|
+
case 55:
|
|
242
245
|
this.$ = {dots: true };
|
|
243
246
|
break;
|
|
244
|
-
case
|
|
247
|
+
case 56: case 57: case 58:
|
|
245
248
|
this.$ = {label: $$[$0].value, filter: $$[$0-1]};
|
|
246
249
|
break;
|
|
247
|
-
case
|
|
250
|
+
case 59: case 60: case 61:
|
|
248
251
|
this.$ = {label: $$[$0-2].value, filter: $$[$0]};
|
|
249
252
|
break;
|
|
250
|
-
case
|
|
253
|
+
case 63:
|
|
251
254
|
this.$ = {...comp($$[$0-1], $$[$0]), start: $$[$0-1].start, end:$$[$0].end};
|
|
252
255
|
break;
|
|
253
|
-
case
|
|
256
|
+
case 64:
|
|
254
257
|
this.$ = {op: 'caret', caret: $$[$0-1], start: $$[$0-1].start, end:$$[$0].end};
|
|
255
258
|
break;
|
|
256
|
-
case
|
|
259
|
+
case 65:
|
|
257
260
|
this.$ = {...$$[$0-1], start: $$[$0-2].start, end: $$[$0].end};
|
|
258
261
|
break;
|
|
259
|
-
case
|
|
262
|
+
case 66:
|
|
260
263
|
this.$ = {op: "vector", vector: $$[$0-1], start: $$[$0-2].start, end: $$[$0].end};
|
|
261
264
|
break;
|
|
262
|
-
case
|
|
265
|
+
case 67:
|
|
263
266
|
this.$ = {...union($$[$0-1]), start: $$[$0-2].start, end: $$[$0].end};
|
|
264
267
|
break;
|
|
265
|
-
case
|
|
268
|
+
case 68:
|
|
266
269
|
this.$ = {op: "ref", ref: $$[$0].value, start: $$[$0].start, end: $$[$0].end};
|
|
267
270
|
break;
|
|
268
|
-
case
|
|
271
|
+
case 69:
|
|
269
272
|
this.$ = {...identity, start: $$[$0-1].start, end: $$[$0].end};
|
|
270
273
|
break;
|
|
271
|
-
case
|
|
274
|
+
case 70:
|
|
272
275
|
this.$ = {...$$[$0-1], start: $$[$0-2].start, end: $$[$0].end };
|
|
273
276
|
break;
|
|
274
|
-
case
|
|
277
|
+
case 71:
|
|
275
278
|
this.$ = {op: "str", str: $$[$0].value, start: $$[$0].start, end: $$[$0].end };
|
|
276
279
|
break;
|
|
277
|
-
case
|
|
280
|
+
case 72:
|
|
278
281
|
this.$ = {op: "int", int: $$[$0].value, start: $$[$0].start, end: $$[$0].end };
|
|
279
282
|
break;
|
|
280
|
-
case
|
|
283
|
+
case 73: case 74: case 75:
|
|
281
284
|
this.$ = {op: "dot", dot: $$[$0].value, start: $$[$0-1].start, end: $$[$0].end };
|
|
282
285
|
break;
|
|
283
|
-
case
|
|
286
|
+
case 76:
|
|
284
287
|
this.$ = {op: "code", code: s.as_ref($$[$0]), start: $$[$0-1].start, end: $$[$0].end};
|
|
285
288
|
break;
|
|
286
|
-
case
|
|
289
|
+
case 77:
|
|
287
290
|
this.$ = {op: "filter", filter: $$[$0], start: $$[$0-1].start, end:$$[$0].end};
|
|
288
291
|
break;
|
|
289
|
-
case
|
|
292
|
+
case 78:
|
|
290
293
|
this.$ = {op: "pipe", start: $$[$0].start, end: $$[$0].end};
|
|
291
294
|
break;
|
|
292
|
-
case
|
|
295
|
+
case 79:
|
|
293
296
|
this.$ = {op: "product", product: []};
|
|
294
297
|
break;
|
|
295
|
-
case
|
|
298
|
+
case 80:
|
|
296
299
|
$$[$0].product.reduce( (labels, {label}) =>
|
|
297
300
|
{ if (labels[label])
|
|
298
301
|
anError(this._$,`Duplicate label '${label}'.`)
|
|
@@ -300,24 +303,24 @@ case 79:
|
|
|
300
303
|
return labels; }, {});
|
|
301
304
|
this.$ = $$[$0];
|
|
302
305
|
break;
|
|
303
|
-
case
|
|
306
|
+
case 81:
|
|
304
307
|
this.$ = {op: "product", product: [$$[$0]]};
|
|
305
308
|
break;
|
|
306
|
-
case
|
|
309
|
+
case 82:
|
|
307
310
|
$$[$0-2].product = [].concat($$[$0-2].product,$$[$0]); this.$ = $$[$0-2];
|
|
308
311
|
break;
|
|
309
|
-
case
|
|
312
|
+
case 83: case 84: case 85:
|
|
310
313
|
this.$ = {label: $$[$0].value, exp: $$[$0-1]};
|
|
311
314
|
break;
|
|
312
|
-
case
|
|
315
|
+
case 86: case 87: case 88:
|
|
313
316
|
this.$ = {label: $$[$0-2].value, exp: $$[$0]};
|
|
314
317
|
break;
|
|
315
|
-
case
|
|
318
|
+
case 89:
|
|
316
319
|
this.$ = [];
|
|
317
320
|
break;
|
|
318
321
|
}
|
|
319
322
|
},
|
|
320
|
-
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,
|
|
323
|
+
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,59:9,63:$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],59:30,60:$Vc,63:$Vb},o($Vd,$Ve,{25:34,26:$Vf}),{3:36,4:$V1,9:42,10:$V4,11:40,12:$V5,13:41,14:$V6,48:39,49:37,50:$Vg},o($Vh,[2,62]),o([4,6,8,10,12,14,16,18,20,22,24,26,30,32,34,36,38,40,47,60,63],[2,1]),o([4,10,12,14,50],[2,18]),{3:47,4:$V1,5:48,6:$V2,7:49,8:$V3,9:14,10:$V4,11:12,12:$V5,13:13,14:$V6,15:15,16:$V7,20:[2,79],29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:46,59:9,61:43,63:$Vb,64:44,65:45},{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:$Vi,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:52,59:9,62:50,63:$Vb,66:51},{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:$Vi,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:52,59:9,62:53,63:$Vb,66:51},{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:54,24:$Vj,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,46:55,59:9,63:$Vb},o($Vh,$Vk),o($Vh,$Vl),{3:59,4:$V1,5:58,6:$V2,7:57,8:$V3},{3:62,4:$V1,9:65,10:$V4,11:66,12:$V5,13:67,14:$V6,15:64,16:$V7,37:63,38:$V9,54:61,56:60},o($Vh,[2,78]),o([4,6,8,10,12,14,16,20,28,30,38,40,50,63],[2,5]),o([4,6,8,10,12,14,16,22,30,38,40,50,63],[2,6]),o([4,6,8,10,12,14,16,18,28,30,38,40,50,63],[2,4]),o([4,6,8,10,12,14,16,24,28,30,38,40,63],[2,7]),o($Vm,[2,2]),o($Vm,[2,3]),o($Vn,[2,14]),o([4,10,12,14,16,38],[2,19]),{1:[2,21]},o($Vh,[2,63]),o($Vh,[2,64]),o($Vh,$Ve),{3:68,4:$V1,9:42,10:$V4,11:40,12:$V5,13:41,14:$V6,48:39,49:37,50:$Vg},{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:69,59:9,63:$Vb},o($V0,[2,12]),o($Vd,$Vo,{25:70,26:$Vf}),o($Vh,[2,76]),{3:71,4:$V1},o($Vp,[2,29]),{3:76,4:$V1,5:77,6:$V2,7:78,8:$V3,9:42,10:$V4,11:40,12:$V5,13:41,14:$V6,20:$Vq,48:39,49:75,50:$Vg,51:72,52:73,53:74},{3:68,4:$V1,9:42,10:$V4,11:40,12:$V5,13:41,14:$V6,48:39,49:79,50:$Vg},{3:76,4:$V1,5:77,6:$V2,7:78,8:$V3,9:42,10:$V4,11:40,12:$V5,13:41,14:$V6,18:$Vq,48:39,49:75,50:$Vg,51:80,52:73,53:74},{19:81,20:$Vr},{20:[2,80],31:83,32:$Vs},o($Vt,[2,81]),{3:85,4:$V1,5:86,6:$V2,7:87,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,59:30,60:$Vc,63:$Vb},o($Vu,$Ve,{35:88,36:$Vv}),o($Vu,$Vk,{35:90,36:$Vv}),o($Vu,$Vl,{35:91,36:$Vv}),{21:92,22:$Vw},o([18,22],[2,90],{31:94,32:$Vs}),o($Vx,[2,91],{11:12,13:13,9:14,15:15,5:16,7:17,29:18,39:19,59: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,60:$Vc,63:$Vb}),{17:95,18:$Vy},o($Vh,[2,69]),{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:97,24:$Vj,29:18,30:$V8,37:33,38:$V9,39:19,40:$Va,59:30,60:$Vc,63:$Vb},o($Vp,[2,11]),o($Vh,[2,73]),o($Vh,[2,74]),o($Vh,[2,75]),o($Vh,[2,77]),o($Vh,[2,48],{26:[1,98]}),o($Vh,$Vz),{3:68,4:$V1,9:42,10:$V4,11:40,12:$V5,13:41,14:$V6,48:39,49:99,50:$Vg},{3:105,4:$V1,5:106,6:$V2,7:107,8:$V3,9:65,10:$V4,11:66,12:$V5,13:67,14:$V6,15:64,16:$V7,24:$VA,27:103,28:$VB,37:63,38:$V9,54:61,55:100,56:104,57:101,58:102},{3:105,4:$V1,5:106,6:$V2,7:107,8:$V3,9:65,10:$V4,11:66,12:$V5,13:67,14:$V6,15:64,16:$V7,18:$VA,27:103,28:$VB,37:63,38:$V9,54:61,55:109,56:104,57:101,58:102},{3:105,4:$V1,5:106,6:$V2,7:107,8:$V3,9:65,10:$V4,11:66,12:$V5,13:67,14:$V6,15:64,16:$V7,20:$VA,27:103,28:$VB,37:63,38:$V9,54:61,55:110,56:104,57:101,58:102},{3:62,4:$V1,9:65,10:$V4,11:66,12:$V5,13:67,14:$V6,15:64,16:$V7,37:63,38:$V9,54:61,56:111},o($Vp,$Vo),{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:112,34:[1,113],37:33,38:$V9,39:19,40:$Va,59:30,60:$Vc,63:$Vb},{9:42,10:$V4,11:40,12:$V5,13:41,14:$V6,48:114},o($Vp,[2,28]),{19:115,20:$Vr},o([18,20],[2,34],{31:116,32:$Vs}),o($VC,[2,35]),{3:117,4:$V1,5:118,6:$V2,7:119,8:$V3},o($Vn,$Vo,{35:120,36:$Vv}),{35:121,36:$Vv},{35:122,36:$Vv},{21:123,22:$Vw},{17:124,18:$Vy},o($Vh,[2,65]),o($Vp,[2,9]),{3:47,4:$V1,5:48,6:$V2,7:49,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:46,59:9,63:$Vb,65:125},o([4,6,8,10,12,14,16,28,30,38,40,50,63],[2,15]),o($Vu,$Ve,{20:$VD,32:$VD}),o($Vu,$Vk,{20:$VE,32:$VE}),o($Vu,$Vl,{20:$VF,32:$VF}),{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:126,59:9,63:$Vb},o([4,6,8,10,12,14,16,30,38,40,50,63],[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:127,59:9,63:$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:128,59:9,63:$Vb},o($Vh,[2,66]),o($Vp,[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:129,59:9,63:$Vb},o($Vh,[2,67]),o($Vp,[2,8]),o($Vh,[2,70]),{3:130,4:$V1},o($Vp,[2,43]),{23:131,24:$Vj},o([18,20,24],[2,52],{31:132,32:$Vs}),o($VG,[2,53]),o($VG,[2,55]),{3:133,4:$V1,5:134,6:$V2,7:135,8:$V3},o($Vn,$Vz,{35:136,36:$Vv}),{35:137,36:$Vv},{35:138,36:$Vv},o($VG,[2,13]),{17:139,18:$Vy},{19:140,20:$Vr},{21:141,22:$Vw},o($V0,[2,25]),o($V0,[2,16]),{34:[1,142]},o($Vp,[2,30]),{3:76,4:$V1,5:77,6:$V2,7:78,8:$V3,9:42,10:$V4,11:40,12:$V5,13:41,14:$V6,48:39,49:75,50:$Vg,53:143},o($VC,[2,37]),o($VC,[2,38]),o($VC,[2,39]),{3:68,4:$V1,9:42,10:$V4,11:40,12:$V5,13:41,14:$V6,48:39,49:144,50:$Vg},{3:68,4:$V1,9:42,10:$V4,11:40,12:$V5,13:41,14:$V6,48:39,49:145,50:$Vg},{3:68,4:$V1,9:42,10:$V4,11:40,12:$V5,13:41,14:$V6,48:39,49:146,50:$Vg},o($Vp,[2,31]),o($Vp,[2,32]),o($Vt,[2,82]),o($Vt,[2,86],{11:12,13:13,9:14,15:15,5:16,7:17,29:18,39:19,59: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,60:$Vc,63:$Vb}),o($Vt,[2,87],{11:12,13:13,9:14,15:15,5:16,7:17,29:18,39:19,59: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,60:$Vc,63:$Vb}),o($Vt,[2,88],{11:12,13:13,9:14,15:15,5:16,7:17,29:18,39:19,59: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,60:$Vc,63:$Vb}),o($Vx,[2,92],{11:12,13:13,9:14,15:15,5:16,7:17,29:18,39:19,59: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,60:$Vc,63:$Vb}),o($Vh,[2,49]),o($Vp,[2,44]),{3:105,4:$V1,5:106,6:$V2,7:107,8:$V3,9:65,10:$V4,11:66,12:$V5,13:67,14:$V6,15:64,16:$V7,27:103,28:$VB,37:63,38:$V9,54:61,56:104,58:147},o($VG,[2,56]),o($VG,[2,57]),o($VG,[2,58]),{3:62,4:$V1,9:65,10:$V4,11:66,12:$V5,13:67,14:$V6,15:64,16:$V7,37:63,38:$V9,54:61,56:148},{3:62,4:$V1,9:65,10:$V4,11:66,12:$V5,13:67,14:$V6,15:64,16:$V7,37:63,38:$V9,54:61,56:149},{3:62,4:$V1,9:65,10:$V4,11:66,12:$V5,13:67,14:$V6,15:64,16:$V7,37:63,38:$V9,54:61,56:150},o($Vp,[2,45]),o($Vp,[2,46]),o($Vp,[2,47]),o($V0,[2,26]),o($VC,[2,36]),o($VC,[2,40]),o($VC,[2,41]),o($VC,[2,42]),o($VG,[2,54]),o($VG,[2,59]),o($VG,[2,60]),o($VG,[2,61])],
|
|
321
324
|
defaultActions: {29:[2,21]},
|
|
322
325
|
parseError: function parseError (str, hash) {
|
|
323
326
|
if (hash.recoverable) {
|
|
@@ -830,24 +833,26 @@ case 17:return 38;
|
|
|
830
833
|
break;
|
|
831
834
|
case 18:return 40;
|
|
832
835
|
break;
|
|
833
|
-
case 19:return
|
|
836
|
+
case 19:return 63;
|
|
837
|
+
break;
|
|
838
|
+
case 20:return 60;
|
|
834
839
|
break;
|
|
835
|
-
case
|
|
840
|
+
case 21:return 50;
|
|
836
841
|
break;
|
|
837
|
-
case
|
|
842
|
+
case 22:return 6;
|
|
838
843
|
break;
|
|
839
|
-
case
|
|
844
|
+
case 23:return 4;
|
|
840
845
|
break;
|
|
841
|
-
case
|
|
846
|
+
case 24:return 8;
|
|
842
847
|
break;
|
|
843
|
-
case
|
|
848
|
+
case 25:return 42;
|
|
844
849
|
break;
|
|
845
|
-
case
|
|
850
|
+
case 26:return 47;
|
|
846
851
|
break;
|
|
847
852
|
}
|
|
848
853
|
},
|
|
849
|
-
rules: [/^(?:[/][*]([^*]*[*]+[^*/])*[^*]*[*]+[/])/,/^(?:(\/\/|#|%|--|\\)[^\n]*)/,/^(?:\s+)/,/^(?:<)/,/^(?:\{)/,/^(?:\[)/,/^(?:\()/,/^(?:>)/,/^(?:\})/,/^(?:\])/,/^(?:\))/,/^(?:=)/,/^(?:\.\.\.)/,/^(?:\.)/,/^(?:,)/,/^(?:;)/,/^(?::)/,/^(?:\$)/,/^(?:\?)/,/^(?:\|)/,/^(?:\^)/,/^(?:"([^"\\]|\\(.|\n))*"|'([^'\\]|\\(.|\n))*')/,/^(?:[a-zA-Z_][a-zA-Z0-9_?!]*)/,/^(?:0|[-]?[1-9][0-9]*)/,/^(?:\+\+\+)/,/^(?:$)/],
|
|
850
|
-
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}}
|
|
854
|
+
rules: [/^(?:[/][*]([^*]*[*]+[^*/])*[^*]*[*]+[/])/,/^(?:(\/\/|#|%|--|\\)[^\n]*)/,/^(?:\s+)/,/^(?:<)/,/^(?:\{)/,/^(?:\[)/,/^(?:\()/,/^(?:>)/,/^(?:\})/,/^(?:\])/,/^(?:\))/,/^(?:=)/,/^(?:\.\.\.)/,/^(?:\.)/,/^(?:,)/,/^(?:;)/,/^(?::)/,/^(?:\$)/,/^(?:\?)/,/^(?:\|)/,/^(?:\^)/,/^(?:@)/,/^(?:"([^"\\]|\\(.|\n))*"|'([^'\\]|\\(.|\n))*')/,/^(?:[a-zA-Z_][a-zA-Z0-9_?!]*)/,/^(?:0|[-]?[1-9][0-9]*)/,/^(?:\+\+\+)/,/^(?:$)/],
|
|
855
|
+
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,26],"inclusive":true}}
|
|
851
856
|
});
|
|
852
857
|
return lexer;
|
|
853
858
|
})();
|