@gmb/bitmark-parser-generator 1.4.9 → 1.4.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -185,15 +185,13 @@ function peg$parse(input, options) {
185
185
  var peg$c24 = "[&";
186
186
  var peg$c25 = "::";
187
187
  var peg$c26 = "||";
188
- var peg$c27 = "^^";
189
- var peg$c28 = "^";
190
- var peg$c29 = "^]";
191
- var peg$c30 = "id:";
192
- var peg$c31 = "\n";
193
- var peg$c32 = "\r\n";
194
- var peg$c33 = "\r";
195
- var peg$c34 = "\u2028";
196
- var peg$c35 = "\u2029";
188
+ var peg$c27 = "^]";
189
+ var peg$c28 = "id:";
190
+ var peg$c29 = "\n";
191
+ var peg$c30 = "\r\n";
192
+ var peg$c31 = "\r";
193
+ var peg$c32 = "\u2028";
194
+ var peg$c33 = "\u2029";
197
195
  var peg$r0 = /^[^\]]/;
198
196
  var peg$r1 = /^[^:\]]/;
199
197
  var peg$r2 = /^[^&:\]]/;
@@ -229,29 +227,27 @@ function peg$parse(input, options) {
229
227
  var peg$e26 = peg$literalExpectation("[&", false);
230
228
  var peg$e27 = peg$literalExpectation("::", false);
231
229
  var peg$e28 = peg$literalExpectation("||", false);
232
- var peg$e29 = peg$literalExpectation("^^", false);
233
- var peg$e30 = peg$literalExpectation("^", false);
234
- var peg$e31 = peg$literalExpectation("^]", false);
235
- var peg$e32 = peg$literalExpectation("id:", false);
236
- var peg$e33 = peg$classExpectation([":", "]"], true, false);
237
- var peg$e34 = peg$classExpectation(["&", ":", "]"], true, false);
238
- var peg$e35 = peg$otherExpectation("Empty");
239
- var peg$e36 = peg$classExpectation([" ", "\t"], false, false);
240
- var peg$e37 = peg$otherExpectation("Anything");
241
- var peg$e38 = peg$otherExpectation("Character");
242
- var peg$e39 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], true, false);
243
- var peg$e40 = peg$otherExpectation("Line");
244
- var peg$e41 = peg$otherExpectation("whitespace in line");
245
- var peg$e42 = peg$otherExpectation("Blank Line");
246
- var peg$e43 = peg$otherExpectation("Line Terminator");
247
- var peg$e44 = peg$literalExpectation("\n", false);
248
- var peg$e45 = peg$literalExpectation("\r\n", false);
249
- var peg$e46 = peg$literalExpectation("\r", false);
250
- var peg$e47 = peg$literalExpectation("\u2028", false);
251
- var peg$e48 = peg$literalExpectation("\u2029", false);
252
- var peg$e49 = peg$otherExpectation("Whitespace, then Line Terminator");
253
- var peg$e50 = peg$otherExpectation("whitespace");
254
- var peg$e51 = peg$classExpectation([" ", "\t", "\n", "\r", "\u2028", "\u2029"], false, false);
230
+ var peg$e29 = peg$literalExpectation("^]", false);
231
+ var peg$e30 = peg$literalExpectation("id:", false);
232
+ var peg$e31 = peg$classExpectation([":", "]"], true, false);
233
+ var peg$e32 = peg$classExpectation(["&", ":", "]"], true, false);
234
+ var peg$e33 = peg$otherExpectation("Empty");
235
+ var peg$e34 = peg$classExpectation([" ", "\t"], false, false);
236
+ var peg$e35 = peg$otherExpectation("Anything");
237
+ var peg$e36 = peg$otherExpectation("Character");
238
+ var peg$e37 = peg$classExpectation(["\n", "\r", "\u2028", "\u2029"], true, false);
239
+ var peg$e38 = peg$otherExpectation("Line");
240
+ var peg$e39 = peg$otherExpectation("whitespace in line");
241
+ var peg$e40 = peg$otherExpectation("Blank Line");
242
+ var peg$e41 = peg$otherExpectation("Line Terminator");
243
+ var peg$e42 = peg$literalExpectation("\n", false);
244
+ var peg$e43 = peg$literalExpectation("\r\n", false);
245
+ var peg$e44 = peg$literalExpectation("\r", false);
246
+ var peg$e45 = peg$literalExpectation("\u2028", false);
247
+ var peg$e46 = peg$literalExpectation("\u2029", false);
248
+ var peg$e47 = peg$otherExpectation("Whitespace, then Line Terminator");
249
+ var peg$e48 = peg$otherExpectation("whitespace");
250
+ var peg$e49 = peg$classExpectation([" ", "\t", "\n", "\r", "\u2028", "\u2029"], false, false);
255
251
  var peg$f0 = function (firstBit, bits) { return processor.buildBits([firstBit, ...bits]); };
256
252
  var peg$f1 = function (bit) { return helper.handleRawBit(bit); };
257
253
  var peg$f2 = function (bit) { return bit; };
@@ -2381,143 +2377,53 @@ function peg$parse(input, options) {
2381
2377
  return s0;
2382
2378
  }
2383
2379
  function peg$parseTag_Value() {
2384
- var s0, s1, s2, s3, s4, s5, s6;
2380
+ var s0, s1, s2, s3;
2385
2381
  s0 = peg$currPos;
2386
2382
  s1 = peg$currPos;
2387
2383
  s2 = [];
2388
- s3 = peg$currPos;
2389
2384
  if (input.substr(peg$currPos, 2) === peg$c27) {
2390
- s4 = peg$c27;
2385
+ s3 = peg$c27;
2391
2386
  peg$currPos += 2;
2392
2387
  }
2393
2388
  else {
2394
- s4 = peg$FAILED;
2389
+ s3 = peg$FAILED;
2395
2390
  if (peg$silentFails === 0) {
2396
2391
  peg$fail(peg$e29);
2397
2392
  }
2398
2393
  }
2399
- if (s4 !== peg$FAILED) {
2400
- s5 = [];
2401
- if (input.charCodeAt(peg$currPos) === 94) {
2402
- s6 = peg$c28;
2403
- peg$currPos++;
2404
- }
2405
- else {
2406
- s6 = peg$FAILED;
2407
- if (peg$silentFails === 0) {
2408
- peg$fail(peg$e30);
2409
- }
2410
- }
2411
- while (s6 !== peg$FAILED) {
2412
- s5.push(s6);
2413
- if (input.charCodeAt(peg$currPos) === 94) {
2414
- s6 = peg$c28;
2415
- peg$currPos++;
2416
- }
2417
- else {
2418
- s6 = peg$FAILED;
2419
- if (peg$silentFails === 0) {
2420
- peg$fail(peg$e30);
2421
- }
2422
- }
2423
- }
2424
- s4 = [s4, s5];
2425
- s3 = s4;
2426
- }
2427
- else {
2428
- peg$currPos = s3;
2429
- s3 = peg$FAILED;
2430
- }
2431
2394
  if (s3 === peg$FAILED) {
2432
- if (input.substr(peg$currPos, 2) === peg$c29) {
2433
- s3 = peg$c29;
2434
- peg$currPos += 2;
2395
+ if (peg$r0.test(input.charAt(peg$currPos))) {
2396
+ s3 = input.charAt(peg$currPos);
2397
+ peg$currPos++;
2435
2398
  }
2436
2399
  else {
2437
2400
  s3 = peg$FAILED;
2438
2401
  if (peg$silentFails === 0) {
2439
- peg$fail(peg$e31);
2440
- }
2441
- }
2442
- if (s3 === peg$FAILED) {
2443
- if (peg$r0.test(input.charAt(peg$currPos))) {
2444
- s3 = input.charAt(peg$currPos);
2445
- peg$currPos++;
2446
- }
2447
- else {
2448
- s3 = peg$FAILED;
2449
- if (peg$silentFails === 0) {
2450
- peg$fail(peg$e1);
2451
- }
2402
+ peg$fail(peg$e1);
2452
2403
  }
2453
2404
  }
2454
2405
  }
2455
2406
  while (s3 !== peg$FAILED) {
2456
2407
  s2.push(s3);
2457
- s3 = peg$currPos;
2458
2408
  if (input.substr(peg$currPos, 2) === peg$c27) {
2459
- s4 = peg$c27;
2409
+ s3 = peg$c27;
2460
2410
  peg$currPos += 2;
2461
2411
  }
2462
2412
  else {
2463
- s4 = peg$FAILED;
2413
+ s3 = peg$FAILED;
2464
2414
  if (peg$silentFails === 0) {
2465
2415
  peg$fail(peg$e29);
2466
2416
  }
2467
2417
  }
2468
- if (s4 !== peg$FAILED) {
2469
- s5 = [];
2470
- if (input.charCodeAt(peg$currPos) === 94) {
2471
- s6 = peg$c28;
2472
- peg$currPos++;
2473
- }
2474
- else {
2475
- s6 = peg$FAILED;
2476
- if (peg$silentFails === 0) {
2477
- peg$fail(peg$e30);
2478
- }
2479
- }
2480
- while (s6 !== peg$FAILED) {
2481
- s5.push(s6);
2482
- if (input.charCodeAt(peg$currPos) === 94) {
2483
- s6 = peg$c28;
2484
- peg$currPos++;
2485
- }
2486
- else {
2487
- s6 = peg$FAILED;
2488
- if (peg$silentFails === 0) {
2489
- peg$fail(peg$e30);
2490
- }
2491
- }
2492
- }
2493
- s4 = [s4, s5];
2494
- s3 = s4;
2495
- }
2496
- else {
2497
- peg$currPos = s3;
2498
- s3 = peg$FAILED;
2499
- }
2500
2418
  if (s3 === peg$FAILED) {
2501
- if (input.substr(peg$currPos, 2) === peg$c29) {
2502
- s3 = peg$c29;
2503
- peg$currPos += 2;
2419
+ if (peg$r0.test(input.charAt(peg$currPos))) {
2420
+ s3 = input.charAt(peg$currPos);
2421
+ peg$currPos++;
2504
2422
  }
2505
2423
  else {
2506
2424
  s3 = peg$FAILED;
2507
2425
  if (peg$silentFails === 0) {
2508
- peg$fail(peg$e31);
2509
- }
2510
- }
2511
- if (s3 === peg$FAILED) {
2512
- if (peg$r0.test(input.charAt(peg$currPos))) {
2513
- s3 = input.charAt(peg$currPos);
2514
- peg$currPos++;
2515
- }
2516
- else {
2517
- s3 = peg$FAILED;
2518
- if (peg$silentFails === 0) {
2519
- peg$fail(peg$e1);
2520
- }
2426
+ peg$fail(peg$e1);
2521
2427
  }
2522
2428
  }
2523
2429
  }
@@ -2533,14 +2439,14 @@ function peg$parse(input, options) {
2533
2439
  s0 = peg$currPos;
2534
2440
  s1 = peg$currPos;
2535
2441
  peg$silentFails++;
2536
- if (input.substr(peg$currPos, 3) === peg$c30) {
2537
- s2 = peg$c30;
2442
+ if (input.substr(peg$currPos, 3) === peg$c28) {
2443
+ s2 = peg$c28;
2538
2444
  peg$currPos += 3;
2539
2445
  }
2540
2446
  else {
2541
2447
  s2 = peg$FAILED;
2542
2448
  if (peg$silentFails === 0) {
2543
- peg$fail(peg$e32);
2449
+ peg$fail(peg$e30);
2544
2450
  }
2545
2451
  }
2546
2452
  peg$silentFails--;
@@ -2561,7 +2467,7 @@ function peg$parse(input, options) {
2561
2467
  else {
2562
2468
  s4 = peg$FAILED;
2563
2469
  if (peg$silentFails === 0) {
2564
- peg$fail(peg$e33);
2470
+ peg$fail(peg$e31);
2565
2471
  }
2566
2472
  }
2567
2473
  while (s4 !== peg$FAILED) {
@@ -2573,7 +2479,7 @@ function peg$parse(input, options) {
2573
2479
  else {
2574
2480
  s4 = peg$FAILED;
2575
2481
  if (peg$silentFails === 0) {
2576
- peg$fail(peg$e33);
2482
+ peg$fail(peg$e31);
2577
2483
  }
2578
2484
  }
2579
2485
  }
@@ -2645,7 +2551,7 @@ function peg$parse(input, options) {
2645
2551
  else {
2646
2552
  s3 = peg$FAILED;
2647
2553
  if (peg$silentFails === 0) {
2648
- peg$fail(peg$e34);
2554
+ peg$fail(peg$e32);
2649
2555
  }
2650
2556
  }
2651
2557
  while (s3 !== peg$FAILED) {
@@ -2657,7 +2563,7 @@ function peg$parse(input, options) {
2657
2563
  else {
2658
2564
  s3 = peg$FAILED;
2659
2565
  if (peg$silentFails === 0) {
2660
- peg$fail(peg$e34);
2566
+ peg$fail(peg$e32);
2661
2567
  }
2662
2568
  }
2663
2569
  }
@@ -3068,7 +2974,7 @@ function peg$parse(input, options) {
3068
2974
  else {
3069
2975
  s2 = peg$FAILED;
3070
2976
  if (peg$silentFails === 0) {
3071
- peg$fail(peg$e36);
2977
+ peg$fail(peg$e34);
3072
2978
  }
3073
2979
  }
3074
2980
  if (s2 === peg$FAILED) {
@@ -3083,7 +2989,7 @@ function peg$parse(input, options) {
3083
2989
  else {
3084
2990
  s2 = peg$FAILED;
3085
2991
  if (peg$silentFails === 0) {
3086
- peg$fail(peg$e36);
2992
+ peg$fail(peg$e34);
3087
2993
  }
3088
2994
  }
3089
2995
  if (s2 === peg$FAILED) {
@@ -3103,7 +3009,7 @@ function peg$parse(input, options) {
3103
3009
  if (s0 === peg$FAILED) {
3104
3010
  s1 = peg$FAILED;
3105
3011
  if (peg$silentFails === 0) {
3106
- peg$fail(peg$e35);
3012
+ peg$fail(peg$e33);
3107
3013
  }
3108
3014
  }
3109
3015
  return s0;
@@ -3138,7 +3044,7 @@ function peg$parse(input, options) {
3138
3044
  peg$silentFails--;
3139
3045
  s1 = peg$FAILED;
3140
3046
  if (peg$silentFails === 0) {
3141
- peg$fail(peg$e37);
3047
+ peg$fail(peg$e35);
3142
3048
  }
3143
3049
  return s0;
3144
3050
  }
@@ -3152,14 +3058,14 @@ function peg$parse(input, options) {
3152
3058
  else {
3153
3059
  s0 = peg$FAILED;
3154
3060
  if (peg$silentFails === 0) {
3155
- peg$fail(peg$e39);
3061
+ peg$fail(peg$e37);
3156
3062
  }
3157
3063
  }
3158
3064
  peg$silentFails--;
3159
3065
  if (s0 === peg$FAILED) {
3160
3066
  s1 = peg$FAILED;
3161
3067
  if (peg$silentFails === 0) {
3162
- peg$fail(peg$e38);
3068
+ peg$fail(peg$e36);
3163
3069
  }
3164
3070
  }
3165
3071
  return s0;
@@ -3176,7 +3082,7 @@ function peg$parse(input, options) {
3176
3082
  peg$silentFails--;
3177
3083
  s1 = peg$FAILED;
3178
3084
  if (peg$silentFails === 0) {
3179
- peg$fail(peg$e40);
3085
+ peg$fail(peg$e38);
3180
3086
  }
3181
3087
  return s0;
3182
3088
  }
@@ -3190,14 +3096,14 @@ function peg$parse(input, options) {
3190
3096
  else {
3191
3097
  s0 = peg$FAILED;
3192
3098
  if (peg$silentFails === 0) {
3193
- peg$fail(peg$e36);
3099
+ peg$fail(peg$e34);
3194
3100
  }
3195
3101
  }
3196
3102
  peg$silentFails--;
3197
3103
  if (s0 === peg$FAILED) {
3198
3104
  s1 = peg$FAILED;
3199
3105
  if (peg$silentFails === 0) {
3200
- peg$fail(peg$e41);
3106
+ peg$fail(peg$e39);
3201
3107
  }
3202
3108
  }
3203
3109
  return s0;
@@ -3214,7 +3120,7 @@ function peg$parse(input, options) {
3214
3120
  else {
3215
3121
  s2 = peg$FAILED;
3216
3122
  if (peg$silentFails === 0) {
3217
- peg$fail(peg$e36);
3123
+ peg$fail(peg$e34);
3218
3124
  }
3219
3125
  }
3220
3126
  while (s2 !== peg$FAILED) {
@@ -3226,7 +3132,7 @@ function peg$parse(input, options) {
3226
3132
  else {
3227
3133
  s2 = peg$FAILED;
3228
3134
  if (peg$silentFails === 0) {
3229
- peg$fail(peg$e36);
3135
+ peg$fail(peg$e34);
3230
3136
  }
3231
3137
  }
3232
3138
  }
@@ -3243,7 +3149,7 @@ function peg$parse(input, options) {
3243
3149
  if (s0 === peg$FAILED) {
3244
3150
  s1 = peg$FAILED;
3245
3151
  if (peg$silentFails === 0) {
3246
- peg$fail(peg$e42);
3152
+ peg$fail(peg$e40);
3247
3153
  }
3248
3154
  }
3249
3155
  return s0;
@@ -3252,57 +3158,57 @@ function peg$parse(input, options) {
3252
3158
  var s0, s1;
3253
3159
  peg$silentFails++;
3254
3160
  if (input.charCodeAt(peg$currPos) === 10) {
3255
- s0 = peg$c31;
3161
+ s0 = peg$c29;
3256
3162
  peg$currPos++;
3257
3163
  }
3258
3164
  else {
3259
3165
  s0 = peg$FAILED;
3260
3166
  if (peg$silentFails === 0) {
3261
- peg$fail(peg$e44);
3167
+ peg$fail(peg$e42);
3262
3168
  }
3263
3169
  }
3264
3170
  if (s0 === peg$FAILED) {
3265
- if (input.substr(peg$currPos, 2) === peg$c32) {
3266
- s0 = peg$c32;
3171
+ if (input.substr(peg$currPos, 2) === peg$c30) {
3172
+ s0 = peg$c30;
3267
3173
  peg$currPos += 2;
3268
3174
  }
3269
3175
  else {
3270
3176
  s0 = peg$FAILED;
3271
3177
  if (peg$silentFails === 0) {
3272
- peg$fail(peg$e45);
3178
+ peg$fail(peg$e43);
3273
3179
  }
3274
3180
  }
3275
3181
  if (s0 === peg$FAILED) {
3276
3182
  if (input.charCodeAt(peg$currPos) === 13) {
3277
- s0 = peg$c33;
3183
+ s0 = peg$c31;
3278
3184
  peg$currPos++;
3279
3185
  }
3280
3186
  else {
3281
3187
  s0 = peg$FAILED;
3282
3188
  if (peg$silentFails === 0) {
3283
- peg$fail(peg$e46);
3189
+ peg$fail(peg$e44);
3284
3190
  }
3285
3191
  }
3286
3192
  if (s0 === peg$FAILED) {
3287
3193
  if (input.charCodeAt(peg$currPos) === 8232) {
3288
- s0 = peg$c34;
3194
+ s0 = peg$c32;
3289
3195
  peg$currPos++;
3290
3196
  }
3291
3197
  else {
3292
3198
  s0 = peg$FAILED;
3293
3199
  if (peg$silentFails === 0) {
3294
- peg$fail(peg$e47);
3200
+ peg$fail(peg$e45);
3295
3201
  }
3296
3202
  }
3297
3203
  if (s0 === peg$FAILED) {
3298
3204
  if (input.charCodeAt(peg$currPos) === 8233) {
3299
- s0 = peg$c35;
3205
+ s0 = peg$c33;
3300
3206
  peg$currPos++;
3301
3207
  }
3302
3208
  else {
3303
3209
  s0 = peg$FAILED;
3304
3210
  if (peg$silentFails === 0) {
3305
- peg$fail(peg$e48);
3211
+ peg$fail(peg$e46);
3306
3212
  }
3307
3213
  }
3308
3214
  }
@@ -3313,7 +3219,7 @@ function peg$parse(input, options) {
3313
3219
  if (s0 === peg$FAILED) {
3314
3220
  s1 = peg$FAILED;
3315
3221
  if (peg$silentFails === 0) {
3316
- peg$fail(peg$e43);
3222
+ peg$fail(peg$e41);
3317
3223
  }
3318
3224
  }
3319
3225
  return s0;
@@ -3330,7 +3236,7 @@ function peg$parse(input, options) {
3330
3236
  else {
3331
3237
  s2 = peg$FAILED;
3332
3238
  if (peg$silentFails === 0) {
3333
- peg$fail(peg$e36);
3239
+ peg$fail(peg$e34);
3334
3240
  }
3335
3241
  }
3336
3242
  while (s2 !== peg$FAILED) {
@@ -3342,7 +3248,7 @@ function peg$parse(input, options) {
3342
3248
  else {
3343
3249
  s2 = peg$FAILED;
3344
3250
  if (peg$silentFails === 0) {
3345
- peg$fail(peg$e36);
3251
+ peg$fail(peg$e34);
3346
3252
  }
3347
3253
  }
3348
3254
  }
@@ -3359,7 +3265,7 @@ function peg$parse(input, options) {
3359
3265
  if (s0 === peg$FAILED) {
3360
3266
  s1 = peg$FAILED;
3361
3267
  if (peg$silentFails === 0) {
3362
- peg$fail(peg$e49);
3268
+ peg$fail(peg$e47);
3363
3269
  }
3364
3270
  }
3365
3271
  return s0;
@@ -3374,14 +3280,14 @@ function peg$parse(input, options) {
3374
3280
  else {
3375
3281
  s0 = peg$FAILED;
3376
3282
  if (peg$silentFails === 0) {
3377
- peg$fail(peg$e51);
3283
+ peg$fail(peg$e49);
3378
3284
  }
3379
3285
  }
3380
3286
  peg$silentFails--;
3381
3287
  if (s0 === peg$FAILED) {
3382
3288
  s1 = peg$FAILED;
3383
3289
  if (peg$silentFails === 0) {
3384
- peg$fail(peg$e50);
3290
+ peg$fail(peg$e48);
3385
3291
  }
3386
3292
  }
3387
3293
  return s0;