sqllang 0.0.2 → 0.0.4

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/src/parser.js CHANGED
@@ -291,6 +291,16 @@ const tokens = [
291
291
  "pattern": "FILTER(?![A-Za-z0-9_])",
292
292
  "ignoreCase": true
293
293
  },
294
+ {
295
+ "name": "For",
296
+ "pattern": "FOR(?![A-Za-z0-9_])",
297
+ "ignoreCase": true
298
+ },
299
+ {
300
+ "name": "Pivot",
301
+ "pattern": "PIVOT(?=\\s*\\()",
302
+ "ignoreCase": true
303
+ },
294
304
  {
295
305
  "name": "Number",
296
306
  "pattern": "(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:[eE][+-]?[0-9]+)?"
@@ -430,11 +440,11 @@ const lexer = (() => {
430
440
  const DISPATCH = "ĀĀĀĀĀĀĀĀĀāāāāāĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀĀāĂăĀĄąĀĆćĈĉĊċČčĎďďďďďďďďďďĐđĒēĔĕĀĖėĘęĚěĜĝĞğĠġĠĢģĤĠĥĦħĨĩĪĠĠĠīĀĬĀĠĭĖėĘęĚěĜĝĞğĠġĠĢģĤĠĥĦħĨĩĪĠĠĠĀĮĀĀĀā"
431
441
 
432
442
  // Patterns are read from the token table above rather than repeated here.
433
- const RX = [[0,"y"],[61,"y"],[56,"y"],[2,"y"],[65,"y"],[59,"y"]].map(([i, flags]) => new RegExp(tokens[i].pattern, flags))
443
+ const RX = [[0,"y"],[63,"y"],[58,"y"],[2,"y"],[67,"y"],[57,"iy"],[61,"y"]].map(([i, flags]) => new RegExp(tokens[i].pattern, flags))
434
444
 
435
445
 
436
446
 
437
- const KW = [[[97,115],[65,83]],[[97,108,108],[65,76,76]],[[97,110,100],[65,78,68]],[[97,115,99],[65,83,67]],[[98,101,116,119,101,101,110],[66,69,84,87,69,69,78]],[[98,121],[66,89]],[[99,114,111,115,115],[67,82,79,83,83]],[[99,97,115,101],[67,65,83,69]],[[99,97,115,116],[67,65,83,84]],[[100,105,115,116,105,110,99,116],[68,73,83,84,73,78,67,84]],[[100,101,115,99],[68,69,83,67]],[[101,108,115,101],[69,76,83,69]],[[101,110,100],[69,78,68]],[[101,120,99,101,112,116],[69,88,67,69,80,84]],[[101,120,105,115,116,115],[69,88,73,83,84,83]],[[101,120,116,114,97,99,116],[69,88,84,82,65,67,84]],[[102,114,111,109],[70,82,79,77]],[[102,117,108,108],[70,85,76,76]],[[102,97,108,115,101],[70,65,76,83,69]],[[102,105,108,116,101,114],[70,73,76,84,69,82]],[[103,114,111,117,112],[71,82,79,85,80]],[[104,97,118,105,110,103],[72,65,86,73,78,71]],[[105,110],[73,78]],[[105,115],[73,83]],[[105,108,105,107,101],[73,76,73,75,69]],[[105,110,110,101,114],[73,78,78,69,82]],[[105,110,115,101,114,116],[73,78,83,69,82,84]],[[105,110,116,111],[73,78,84,79]],[[105,110,116,101,114,115,101,99,116],[73,78,84,69,82,83,69,67,84]],[[106,111,105,110],[74,79,73,78]],[[108,105,107,101],[76,73,75,69]],[[108,101,102,116],[76,69,70,84]],[[108,105,109,105,116],[76,73,77,73,84]],[[110,111,116],[78,79,84]],[[110,117,108,108],[78,85,76,76]],[[110,117,108,108,115],[78,85,76,76,83]],[[111,114],[79,82]],[[111,117,116,101,114],[79,85,84,69,82]],[[111,110],[79,78]],[[111,114,100,101,114],[79,82,68,69,82]],[[111,102,102,115,101,116],[79,70,70,83,69,84]],[[111,118,101,114],[79,86,69,82]],[[112,97,114,116,105,116,105,111,110],[80,65,82,84,73,84,73,79,78]],[[114,105,103,104,116],[82,73,71,72,84]],[[115,101,108,101,99,116],[83,69,76,69,67,84]],[[116,114,117,101],[84,82,85,69]],[[116,104,101,110],[84,72,69,78]],[[117,115,105,110,103],[85,83,73,78,71]],[[117,110,105,111,110],[85,78,73,79,78]],[[118,97,108,117,101,115],[86,65,76,85,69,83]],[[119,104,101,114,101],[87,72,69,82,69]],[[119,104,101,110],[87,72,69,78]],[[119,105,116,104],[87,73,84,72]]]
447
+ const KW = [[[97,115],[65,83]],[[97,108,108],[65,76,76]],[[97,110,100],[65,78,68]],[[97,115,99],[65,83,67]],[[98,101,116,119,101,101,110],[66,69,84,87,69,69,78]],[[98,121],[66,89]],[[99,114,111,115,115],[67,82,79,83,83]],[[99,97,115,101],[67,65,83,69]],[[99,97,115,116],[67,65,83,84]],[[100,105,115,116,105,110,99,116],[68,73,83,84,73,78,67,84]],[[100,101,115,99],[68,69,83,67]],[[101,108,115,101],[69,76,83,69]],[[101,110,100],[69,78,68]],[[101,120,99,101,112,116],[69,88,67,69,80,84]],[[101,120,105,115,116,115],[69,88,73,83,84,83]],[[101,120,116,114,97,99,116],[69,88,84,82,65,67,84]],[[102,114,111,109],[70,82,79,77]],[[102,117,108,108],[70,85,76,76]],[[102,97,108,115,101],[70,65,76,83,69]],[[102,105,108,116,101,114],[70,73,76,84,69,82]],[[102,111,114],[70,79,82]],[[103,114,111,117,112],[71,82,79,85,80]],[[104,97,118,105,110,103],[72,65,86,73,78,71]],[[105,110],[73,78]],[[105,115],[73,83]],[[105,108,105,107,101],[73,76,73,75,69]],[[105,110,110,101,114],[73,78,78,69,82]],[[105,110,115,101,114,116],[73,78,83,69,82,84]],[[105,110,116,111],[73,78,84,79]],[[105,110,116,101,114,115,101,99,116],[73,78,84,69,82,83,69,67,84]],[[106,111,105,110],[74,79,73,78]],[[108,105,107,101],[76,73,75,69]],[[108,101,102,116],[76,69,70,84]],[[108,105,109,105,116],[76,73,77,73,84]],[[110,111,116],[78,79,84]],[[110,117,108,108],[78,85,76,76]],[[110,117,108,108,115],[78,85,76,76,83]],[[111,114],[79,82]],[[111,117,116,101,114],[79,85,84,69,82]],[[111,110],[79,78]],[[111,114,100,101,114],[79,82,68,69,82]],[[111,102,102,115,101,116],[79,70,70,83,69,84]],[[111,118,101,114],[79,86,69,82]],[[112,97,114,116,105,116,105,111,110],[80,65,82,84,73,84,73,79,78]],[[114,105,103,104,116],[82,73,71,72,84]],[[115,101,108,101,99,116],[83,69,76,69,67,84]],[[116,114,117,101],[84,82,85,69]],[[116,104,101,110],[84,72,69,78]],[[117,115,105,110,103],[85,83,73,78,71]],[[117,110,105,111,110],[85,78,73,79,78]],[[118,97,108,117,101,115],[86,65,76,85,69,83]],[[119,104,101,114,101],[87,72,69,82,69]],[[119,104,101,110],[87,72,69,78]],[[119,105,116,104],[87,73,84,72]]]
438
448
  const look0 = (c) => (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122)
439
449
  function scanKeyword (text, offset, length, lower, upper, look) {
440
450
  const n = lower.length
@@ -460,7 +470,7 @@ const lexer = (() => {
460
470
  }
461
471
  return j
462
472
  }
463
- function scan58 (text, offset) {
473
+ function scan60 (text, offset) {
464
474
  if (text.charCodeAt(offset) !== 34) return -1
465
475
  let fallback = -1
466
476
  let j = offset + 1
@@ -472,7 +482,7 @@ function scan58 (text, offset) {
472
482
  j += 2
473
483
  }
474
484
  }
475
- function scan57 (text, offset) {
485
+ function scan59 (text, offset) {
476
486
  if (text.charCodeAt(offset) !== 39) return -1
477
487
  let fallback = -1
478
488
  let j = offset + 1
@@ -506,93 +516,93 @@ function scan57 (text, offset) {
506
516
  break
507
517
  }
508
518
  case 2: {
509
- if (text.startsWith("!=", offset)) { id = 70; end = offset + 2; matched = "!="; break found }
519
+ if (text.startsWith("!=", offset)) { id = 72; end = offset + 2; matched = "!="; break found }
510
520
  break
511
521
  }
512
522
  case 3: {
513
- { const e = scan58(text, offset); if (e !== -1) { id = 58; end = e; matched = null; break found } }
523
+ { const e = scan60(text, offset); if (e !== -1) { id = 60; end = e; matched = null; break found } }
514
524
  break
515
525
  }
516
526
  case 4: {
517
- RX[1].lastIndex = offset; m = RX[1].exec(text); if (m !== null && m[0].length > 0) { id = 61; matched = m[0]; end = offset + matched.length; break found }
527
+ RX[1].lastIndex = offset; m = RX[1].exec(text); if (m !== null && m[0].length > 0) { id = 63; matched = m[0]; end = offset + matched.length; break found }
518
528
  break
519
529
  }
520
530
  case 5: {
521
- if (code === 37) { id = 79; end = offset + 1; matched = "%"; break found }
531
+ if (code === 37) { id = 81; end = offset + 1; matched = "%"; break found }
522
532
  break
523
533
  }
524
534
  case 6: {
525
- { const e = scan57(text, offset); if (e !== -1) { id = 57; end = e; matched = null; break found } }
535
+ { const e = scan59(text, offset); if (e !== -1) { id = 59; end = e; matched = null; break found } }
526
536
  break
527
537
  }
528
538
  case 7: {
529
- if (code === 40) { id = 80; end = offset + 1; matched = "("; break found }
539
+ if (code === 40) { id = 82; end = offset + 1; matched = "("; break found }
530
540
  break
531
541
  }
532
542
  case 8: {
533
- if (code === 41) { id = 81; end = offset + 1; matched = ")"; break found }
543
+ if (code === 41) { id = 83; end = offset + 1; matched = ")"; break found }
534
544
  break
535
545
  }
536
546
  case 9: {
537
- if (code === 42) { id = 77; end = offset + 1; matched = "*"; break found }
547
+ if (code === 42) { id = 79; end = offset + 1; matched = "*"; break found }
538
548
  break
539
549
  }
540
550
  case 10: {
541
- if (code === 43) { id = 75; end = offset + 1; matched = "+"; break found }
551
+ if (code === 43) { id = 77; end = offset + 1; matched = "+"; break found }
542
552
  break
543
553
  }
544
554
  case 11: {
545
- if (code === 44) { id = 84; end = offset + 1; matched = ","; break found }
555
+ if (code === 44) { id = 86; end = offset + 1; matched = ","; break found }
546
556
  break
547
557
  }
548
558
  case 12: {
549
559
  if (text.startsWith("--", offset)) { let j = offset + 2; while (j < length) { const c = text.charCodeAt(j); if (c === 10) break; j++ } id = 1; end = j; matched = null; break found }
550
- if (text.startsWith("->>", offset)) { id = 62; end = offset + 3; matched = "->>"; break found }
551
- if (text.startsWith("->", offset)) { id = 63; end = offset + 2; matched = "->"; break found }
552
- if (code === 45) { id = 76; end = offset + 1; matched = "-"; break found }
560
+ if (text.startsWith("->>", offset)) { id = 64; end = offset + 3; matched = "->>"; break found }
561
+ if (text.startsWith("->", offset)) { id = 65; end = offset + 2; matched = "->"; break found }
562
+ if (code === 45) { id = 78; end = offset + 1; matched = "-"; break found }
553
563
  break
554
564
  }
555
565
  case 13: {
556
- RX[2].lastIndex = offset; m = RX[2].exec(text); if (m !== null && m[0].length > 0) { id = 56; matched = m[0]; end = offset + matched.length; break found }
557
- if (code === 46) { id = 85; end = offset + 1; matched = "."; break found }
566
+ RX[2].lastIndex = offset; m = RX[2].exec(text); if (m !== null && m[0].length > 0) { id = 58; matched = m[0]; end = offset + matched.length; break found }
567
+ if (code === 46) { id = 87; end = offset + 1; matched = "."; break found }
558
568
  break
559
569
  }
560
570
  case 14: {
561
571
  RX[3].lastIndex = offset; if (RX[3].test(text) && RX[3].lastIndex > offset) { id = 2; end = RX[3].lastIndex; matched = null; break found }
562
- if (code === 47) { id = 78; end = offset + 1; matched = "/"; break found }
572
+ if (code === 47) { id = 80; end = offset + 1; matched = "/"; break found }
563
573
  break
564
574
  }
565
575
  case 15: {
566
- RX[2].lastIndex = offset; m = RX[2].exec(text); if (m !== null && m[0].length > 0) { id = 56; matched = m[0]; end = offset + matched.length; break found }
576
+ RX[2].lastIndex = offset; m = RX[2].exec(text); if (m !== null && m[0].length > 0) { id = 58; matched = m[0]; end = offset + matched.length; break found }
567
577
  break
568
578
  }
569
579
  case 16: {
570
- if (text.startsWith("::", offset)) { id = 64; end = offset + 2; matched = "::"; break found }
571
- RX[4].lastIndex = offset; m = RX[4].exec(text); if (m !== null && m[0].length > 0) { id = 65; matched = m[0]; end = offset + matched.length; break found }
580
+ if (text.startsWith("::", offset)) { id = 66; end = offset + 2; matched = "::"; break found }
581
+ RX[4].lastIndex = offset; m = RX[4].exec(text); if (m !== null && m[0].length > 0) { id = 67; matched = m[0]; end = offset + matched.length; break found }
572
582
  break
573
583
  }
574
584
  case 17: {
575
- if (code === 59) { id = 86; end = offset + 1; matched = ";"; break found }
585
+ if (code === 59) { id = 88; end = offset + 1; matched = ";"; break found }
576
586
  break
577
587
  }
578
588
  case 18: {
579
- if (text.startsWith("<>", offset)) { id = 67; end = offset + 2; matched = "<>"; break found }
580
- if (text.startsWith("<=", offset)) { id = 68; end = offset + 2; matched = "<="; break found }
581
- if (code === 60) { id = 72; end = offset + 1; matched = "<"; break found }
589
+ if (text.startsWith("<>", offset)) { id = 69; end = offset + 2; matched = "<>"; break found }
590
+ if (text.startsWith("<=", offset)) { id = 70; end = offset + 2; matched = "<="; break found }
591
+ if (code === 60) { id = 74; end = offset + 1; matched = "<"; break found }
582
592
  break
583
593
  }
584
594
  case 19: {
585
- if (text.startsWith("==", offset)) { id = 71; end = offset + 2; matched = "=="; break found }
586
- if (code === 61) { id = 74; end = offset + 1; matched = "="; break found }
595
+ if (text.startsWith("==", offset)) { id = 73; end = offset + 2; matched = "=="; break found }
596
+ if (code === 61) { id = 76; end = offset + 1; matched = "="; break found }
587
597
  break
588
598
  }
589
599
  case 20: {
590
- if (text.startsWith(">=", offset)) { id = 69; end = offset + 2; matched = ">="; break found }
591
- if (code === 62) { id = 73; end = offset + 1; matched = ">"; break found }
600
+ if (text.startsWith(">=", offset)) { id = 71; end = offset + 2; matched = ">="; break found }
601
+ if (code === 62) { id = 75; end = offset + 1; matched = ">"; break found }
592
602
  break
593
603
  }
594
604
  case 21: {
595
- if (code === 63) { id = 87; end = offset + 1; matched = "?"; break found }
605
+ if (code === 63) { id = 89; end = offset + 1; matched = "?"; break found }
596
606
  break
597
607
  }
598
608
  case 22: {
@@ -600,26 +610,26 @@ function scan57 (text, offset) {
600
610
  { const e = scanKeyword(text, offset, length, KW[1][0], KW[1][1], look0); if (e !== -1) { id = 8; end = e; matched = null; break found } }
601
611
  { const e = scanKeyword(text, offset, length, KW[2][0], KW[2][1], look0); if (e !== -1) { id = 9; end = e; matched = null; break found } }
602
612
  { const e = scanKeyword(text, offset, length, KW[3][0], KW[3][1], look0); if (e !== -1) { id = 30; end = e; matched = null; break found } }
603
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
613
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
604
614
  break
605
615
  }
606
616
  case 23: {
607
617
  { const e = scanKeyword(text, offset, length, KW[4][0], KW[4][1], look0); if (e !== -1) { id = 17; end = e; matched = null; break found } }
608
618
  { const e = scanKeyword(text, offset, length, KW[5][0], KW[5][1], look0); if (e !== -1) { id = 28; end = e; matched = null; break found } }
609
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
619
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
610
620
  break
611
621
  }
612
622
  case 24: {
613
623
  { const e = scanKeyword(text, offset, length, KW[6][0], KW[6][1], look0); if (e !== -1) { id = 23; end = e; matched = null; break found } }
614
624
  { const e = scanKeyword(text, offset, length, KW[7][0], KW[7][1], look0); if (e !== -1) { id = 41; end = e; matched = null; break found } }
615
625
  { const e = scanKeyword(text, offset, length, KW[8][0], KW[8][1], look0); if (e !== -1) { id = 51; end = e; matched = null; break found } }
616
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
626
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
617
627
  break
618
628
  }
619
629
  case 25: {
620
630
  { const e = scanKeyword(text, offset, length, KW[9][0], KW[9][1], look0); if (e !== -1) { id = 7; end = e; matched = null; break found } }
621
631
  { const e = scanKeyword(text, offset, length, KW[10][0], KW[10][1], look0); if (e !== -1) { id = 31; end = e; matched = null; break found } }
622
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
632
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
623
633
  break
624
634
  }
625
635
  case 26: {
@@ -628,7 +638,7 @@ function scan57 (text, offset) {
628
638
  { const e = scanKeyword(text, offset, length, KW[13][0], KW[13][1], look0); if (e !== -1) { id = 48; end = e; matched = null; break found } }
629
639
  { const e = scanKeyword(text, offset, length, KW[14][0], KW[14][1], look0); if (e !== -1) { id = 50; end = e; matched = null; break found } }
630
640
  { const e = scanKeyword(text, offset, length, KW[15][0], KW[15][1], look0); if (e !== -1) { id = 52; end = e; matched = null; break found } }
631
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
641
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
632
642
  break
633
643
  }
634
644
  case 27: {
@@ -636,116 +646,118 @@ function scan57 (text, offset) {
636
646
  { const e = scanKeyword(text, offset, length, KW[17][0], KW[17][1], look0); if (e !== -1) { id = 21; end = e; matched = null; break found } }
637
647
  { const e = scanKeyword(text, offset, length, KW[18][0], KW[18][1], look0); if (e !== -1) { id = 40; end = e; matched = null; break found } }
638
648
  { const e = scanKeyword(text, offset, length, KW[19][0], KW[19][1], look0); if (e !== -1) { id = 55; end = e; matched = null; break found } }
639
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
649
+ { const e = scanKeyword(text, offset, length, KW[20][0], KW[20][1], look0); if (e !== -1) { id = 56; end = e; matched = null; break found } }
650
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
640
651
  break
641
652
  }
642
653
  case 28: {
643
- { const e = scanKeyword(text, offset, length, KW[20][0], KW[20][1], look0); if (e !== -1) { id = 27; end = e; matched = null; break found } }
644
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
654
+ { const e = scanKeyword(text, offset, length, KW[21][0], KW[21][1], look0); if (e !== -1) { id = 27; end = e; matched = null; break found } }
655
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
645
656
  break
646
657
  }
647
658
  case 29: {
648
- { const e = scanKeyword(text, offset, length, KW[21][0], KW[21][1], look0); if (e !== -1) { id = 33; end = e; matched = null; break found } }
649
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
659
+ { const e = scanKeyword(text, offset, length, KW[22][0], KW[22][1], look0); if (e !== -1) { id = 33; end = e; matched = null; break found } }
660
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
650
661
  break
651
662
  }
652
663
  case 30: {
653
- { const e = scanKeyword(text, offset, length, KW[22][0], KW[22][1], look0); if (e !== -1) { id = 12; end = e; matched = null; break found } }
654
- { const e = scanKeyword(text, offset, length, KW[23][0], KW[23][1], look0); if (e !== -1) { id = 13; end = e; matched = null; break found } }
655
- { const e = scanKeyword(text, offset, length, KW[24][0], KW[24][1], look0); if (e !== -1) { id = 16; end = e; matched = null; break found } }
656
- { const e = scanKeyword(text, offset, length, KW[25][0], KW[25][1], look0); if (e !== -1) { id = 18; end = e; matched = null; break found } }
657
- { const e = scanKeyword(text, offset, length, KW[26][0], KW[26][1], look0); if (e !== -1) { id = 36; end = e; matched = null; break found } }
658
- { const e = scanKeyword(text, offset, length, KW[27][0], KW[27][1], look0); if (e !== -1) { id = 37; end = e; matched = null; break found } }
659
- { const e = scanKeyword(text, offset, length, KW[28][0], KW[28][1], look0); if (e !== -1) { id = 49; end = e; matched = null; break found } }
660
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
664
+ { const e = scanKeyword(text, offset, length, KW[23][0], KW[23][1], look0); if (e !== -1) { id = 12; end = e; matched = null; break found } }
665
+ { const e = scanKeyword(text, offset, length, KW[24][0], KW[24][1], look0); if (e !== -1) { id = 13; end = e; matched = null; break found } }
666
+ { const e = scanKeyword(text, offset, length, KW[25][0], KW[25][1], look0); if (e !== -1) { id = 16; end = e; matched = null; break found } }
667
+ { const e = scanKeyword(text, offset, length, KW[26][0], KW[26][1], look0); if (e !== -1) { id = 18; end = e; matched = null; break found } }
668
+ { const e = scanKeyword(text, offset, length, KW[27][0], KW[27][1], look0); if (e !== -1) { id = 36; end = e; matched = null; break found } }
669
+ { const e = scanKeyword(text, offset, length, KW[28][0], KW[28][1], look0); if (e !== -1) { id = 37; end = e; matched = null; break found } }
670
+ { const e = scanKeyword(text, offset, length, KW[29][0], KW[29][1], look0); if (e !== -1) { id = 49; end = e; matched = null; break found } }
671
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
661
672
  break
662
673
  }
663
674
  case 31: {
664
- { const e = scanKeyword(text, offset, length, KW[29][0], KW[29][1], look0); if (e !== -1) { id = 24; end = e; matched = null; break found } }
665
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
675
+ { const e = scanKeyword(text, offset, length, KW[30][0], KW[30][1], look0); if (e !== -1) { id = 24; end = e; matched = null; break found } }
676
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
666
677
  break
667
678
  }
668
679
  case 32: {
669
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
680
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
670
681
  break
671
682
  }
672
683
  case 33: {
673
- { const e = scanKeyword(text, offset, length, KW[30][0], KW[30][1], look0); if (e !== -1) { id = 15; end = e; matched = null; break found } }
674
- { const e = scanKeyword(text, offset, length, KW[31][0], KW[31][1], look0); if (e !== -1) { id = 19; end = e; matched = null; break found } }
675
- { const e = scanKeyword(text, offset, length, KW[32][0], KW[32][1], look0); if (e !== -1) { id = 34; end = e; matched = null; break found } }
676
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
684
+ { const e = scanKeyword(text, offset, length, KW[31][0], KW[31][1], look0); if (e !== -1) { id = 15; end = e; matched = null; break found } }
685
+ { const e = scanKeyword(text, offset, length, KW[32][0], KW[32][1], look0); if (e !== -1) { id = 19; end = e; matched = null; break found } }
686
+ { const e = scanKeyword(text, offset, length, KW[33][0], KW[33][1], look0); if (e !== -1) { id = 34; end = e; matched = null; break found } }
687
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
677
688
  break
678
689
  }
679
690
  case 34: {
680
- { const e = scanKeyword(text, offset, length, KW[33][0], KW[33][1], look0); if (e !== -1) { id = 11; end = e; matched = null; break found } }
681
- { const e = scanKeyword(text, offset, length, KW[34][0], KW[34][1], look0); if (e !== -1) { id = 14; end = e; matched = null; break found } }
682
- { const e = scanKeyword(text, offset, length, KW[35][0], KW[35][1], look0); if (e !== -1) { id = 32; end = e; matched = null; break found } }
683
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
691
+ { const e = scanKeyword(text, offset, length, KW[34][0], KW[34][1], look0); if (e !== -1) { id = 11; end = e; matched = null; break found } }
692
+ { const e = scanKeyword(text, offset, length, KW[35][0], KW[35][1], look0); if (e !== -1) { id = 14; end = e; matched = null; break found } }
693
+ { const e = scanKeyword(text, offset, length, KW[36][0], KW[36][1], look0); if (e !== -1) { id = 32; end = e; matched = null; break found } }
694
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
684
695
  break
685
696
  }
686
697
  case 35: {
687
- { const e = scanKeyword(text, offset, length, KW[36][0], KW[36][1], look0); if (e !== -1) { id = 10; end = e; matched = null; break found } }
688
- { const e = scanKeyword(text, offset, length, KW[37][0], KW[37][1], look0); if (e !== -1) { id = 22; end = e; matched = null; break found } }
689
- { const e = scanKeyword(text, offset, length, KW[38][0], KW[38][1], look0); if (e !== -1) { id = 25; end = e; matched = null; break found } }
690
- { const e = scanKeyword(text, offset, length, KW[39][0], KW[39][1], look0); if (e !== -1) { id = 29; end = e; matched = null; break found } }
691
- { const e = scanKeyword(text, offset, length, KW[40][0], KW[40][1], look0); if (e !== -1) { id = 35; end = e; matched = null; break found } }
692
- { const e = scanKeyword(text, offset, length, KW[41][0], KW[41][1], look0); if (e !== -1) { id = 53; end = e; matched = null; break found } }
693
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
698
+ { const e = scanKeyword(text, offset, length, KW[37][0], KW[37][1], look0); if (e !== -1) { id = 10; end = e; matched = null; break found } }
699
+ { const e = scanKeyword(text, offset, length, KW[38][0], KW[38][1], look0); if (e !== -1) { id = 22; end = e; matched = null; break found } }
700
+ { const e = scanKeyword(text, offset, length, KW[39][0], KW[39][1], look0); if (e !== -1) { id = 25; end = e; matched = null; break found } }
701
+ { const e = scanKeyword(text, offset, length, KW[40][0], KW[40][1], look0); if (e !== -1) { id = 29; end = e; matched = null; break found } }
702
+ { const e = scanKeyword(text, offset, length, KW[41][0], KW[41][1], look0); if (e !== -1) { id = 35; end = e; matched = null; break found } }
703
+ { const e = scanKeyword(text, offset, length, KW[42][0], KW[42][1], look0); if (e !== -1) { id = 53; end = e; matched = null; break found } }
704
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
694
705
  break
695
706
  }
696
707
  case 36: {
697
- { const e = scanKeyword(text, offset, length, KW[42][0], KW[42][1], look0); if (e !== -1) { id = 54; end = e; matched = null; break found } }
698
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
708
+ { const e = scanKeyword(text, offset, length, KW[43][0], KW[43][1], look0); if (e !== -1) { id = 54; end = e; matched = null; break found } }
709
+ RX[5].lastIndex = offset; m = RX[5].exec(text); if (m !== null && m[0].length > 0) { id = 57; matched = m[0]; end = offset + matched.length; break found }
710
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
699
711
  break
700
712
  }
701
713
  case 37: {
702
- { const e = scanKeyword(text, offset, length, KW[43][0], KW[43][1], look0); if (e !== -1) { id = 20; end = e; matched = null; break found } }
703
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
714
+ { const e = scanKeyword(text, offset, length, KW[44][0], KW[44][1], look0); if (e !== -1) { id = 20; end = e; matched = null; break found } }
715
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
704
716
  break
705
717
  }
706
718
  case 38: {
707
- { const e = scanKeyword(text, offset, length, KW[44][0], KW[44][1], look0); if (e !== -1) { id = 3; end = e; matched = null; break found } }
708
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
719
+ { const e = scanKeyword(text, offset, length, KW[45][0], KW[45][1], look0); if (e !== -1) { id = 3; end = e; matched = null; break found } }
720
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
709
721
  break
710
722
  }
711
723
  case 39: {
712
- { const e = scanKeyword(text, offset, length, KW[45][0], KW[45][1], look0); if (e !== -1) { id = 39; end = e; matched = null; break found } }
713
- { const e = scanKeyword(text, offset, length, KW[46][0], KW[46][1], look0); if (e !== -1) { id = 43; end = e; matched = null; break found } }
714
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
724
+ { const e = scanKeyword(text, offset, length, KW[46][0], KW[46][1], look0); if (e !== -1) { id = 39; end = e; matched = null; break found } }
725
+ { const e = scanKeyword(text, offset, length, KW[47][0], KW[47][1], look0); if (e !== -1) { id = 43; end = e; matched = null; break found } }
726
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
715
727
  break
716
728
  }
717
729
  case 40: {
718
- { const e = scanKeyword(text, offset, length, KW[47][0], KW[47][1], look0); if (e !== -1) { id = 26; end = e; matched = null; break found } }
719
- { const e = scanKeyword(text, offset, length, KW[48][0], KW[48][1], look0); if (e !== -1) { id = 47; end = e; matched = null; break found } }
720
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
730
+ { const e = scanKeyword(text, offset, length, KW[48][0], KW[48][1], look0); if (e !== -1) { id = 26; end = e; matched = null; break found } }
731
+ { const e = scanKeyword(text, offset, length, KW[49][0], KW[49][1], look0); if (e !== -1) { id = 47; end = e; matched = null; break found } }
732
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
721
733
  break
722
734
  }
723
735
  case 41: {
724
- { const e = scanKeyword(text, offset, length, KW[49][0], KW[49][1], look0); if (e !== -1) { id = 38; end = e; matched = null; break found } }
725
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
736
+ { const e = scanKeyword(text, offset, length, KW[50][0], KW[50][1], look0); if (e !== -1) { id = 38; end = e; matched = null; break found } }
737
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
726
738
  break
727
739
  }
728
740
  case 42: {
729
- { const e = scanKeyword(text, offset, length, KW[50][0], KW[50][1], look0); if (e !== -1) { id = 5; end = e; matched = null; break found } }
730
- { const e = scanKeyword(text, offset, length, KW[51][0], KW[51][1], look0); if (e !== -1) { id = 42; end = e; matched = null; break found } }
731
- { const e = scanKeyword(text, offset, length, KW[52][0], KW[52][1], look0); if (e !== -1) { id = 46; end = e; matched = null; break found } }
732
- if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 60; end = j; matched = null; break found }
741
+ { const e = scanKeyword(text, offset, length, KW[51][0], KW[51][1], look0); if (e !== -1) { id = 5; end = e; matched = null; break found } }
742
+ { const e = scanKeyword(text, offset, length, KW[52][0], KW[52][1], look0); if (e !== -1) { id = 42; end = e; matched = null; break found } }
743
+ { const e = scanKeyword(text, offset, length, KW[53][0], KW[53][1], look0); if (e !== -1) { id = 46; end = e; matched = null; break found } }
744
+ if ((code >= 65 && code <= 90) || code === 95 || (code >= 97 && code <= 122)) { let j = offset + 1; while (j < length) { const c = text.charCodeAt(j); if (!(c === 36 || (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || c === 95 || (c >= 97 && c <= 122))) break; j++ } id = 62; end = j; matched = null; break found }
733
745
  break
734
746
  }
735
747
  case 43: {
736
- if (code === 91) { id = 82; end = offset + 1; matched = "["; break found }
748
+ if (code === 91) { id = 84; end = offset + 1; matched = "["; break found }
737
749
  break
738
750
  }
739
751
  case 44: {
740
- if (code === 93) { id = 83; end = offset + 1; matched = "]"; break found }
752
+ if (code === 93) { id = 85; end = offset + 1; matched = "]"; break found }
741
753
  break
742
754
  }
743
755
  case 45: {
744
- RX[5].lastIndex = offset; m = RX[5].exec(text); if (m !== null && m[0].length > 0) { id = 59; matched = m[0]; end = offset + matched.length; break found }
756
+ RX[6].lastIndex = offset; m = RX[6].exec(text); if (m !== null && m[0].length > 0) { id = 61; matched = m[0]; end = offset + matched.length; break found }
745
757
  break
746
758
  }
747
759
  case 46: {
748
- if (text.startsWith("||", offset)) { id = 66; end = offset + 2; matched = "||"; break found }
760
+ if (text.startsWith("||", offset)) { id = 68; end = offset + 2; matched = "||"; break found }
749
761
  break
750
762
  }
751
763
  }
@@ -898,28 +910,29 @@ const H = [
898
910
  /* 48 */ (context) => { let prev; return engine.methods["caseOf"].method(([(typeof (prev = (context?.["subject"] ?? null)) === 'function' ? null : prev),(typeof (prev = (context?.["whens"] ?? null)) === 'function' ? null : prev),(typeof (prev = (context?.["otherwise"] ?? null)) === 'function' ? null : prev)]), context) },
899
911
  /* 49 */ (context) => { let prev; return ({["CAST"]: [(typeof (prev = (context?.["e"] ?? null)) === 'function' ? null : prev),(typeof (prev = (context?.["t"] ?? null)) === 'function' ? null : prev)]}) },
900
912
  /* 50 */ (context) => { let prev; return ({["DATE_PART"]: [(typeof (prev = (context?.["field"] ?? null)) === 'function' ? null : prev),(typeof (prev = (context?.["e"] ?? null)) === 'function' ? null : prev)]}) },
901
- /* 51 */ (context) => { let prev; return (typeof (prev = (context?.["image"] ?? null)) === 'function' ? null : prev) },
902
- /* 52 */ (context) => { let prev; return ({["$call"]: ({["name"]: (typeof (prev = (context?.["name"] ?? null)) === 'function' ? null : prev), ["args"]: (typeof (prev = (context?.["args"] ?? null)) === 'function' ? null : prev), ["distinct"]: (typeof (prev = (context?.["distinct"] ?? null)) === 'function' ? null : prev), ["star"]: (typeof (prev = (context?.["star"] ?? null)) === 'function' ? null : prev), ["orderBy"]: (typeof (prev = (context?.["orderBy"] ?? null)) === 'function' ? null : prev), ["filter"]: (typeof (prev = (context?.["filter"] ?? null)) === 'function' ? null : prev), ["over"]: (typeof (prev = (context?.["over"] ?? null)) === 'function' ? null : prev)})}) },
903
- /* 53 */ (context) => { let prev; return ({["$ref"]: (typeof (prev = ((context) ?? null)) === 'function' ? null : prev)}) },
904
- /* 54 */ (context) => { let prev; return ({["$param"]: null}) },
905
- /* 55 */ (context) => { let prev; return ({["$param"]: engine.methods["paramName"].method(((typeof (prev = (context?.["image"] ?? null)) === 'function' ? null : prev)), context)}) },
913
+ /* 51 */ (context) => { let prev; return ({["$pivot"]: ({["agg"]: (typeof (prev = (context?.["agg"] ?? null)) === 'function' ? null : prev), ["col"]: (typeof (prev = (context?.["col"] ?? null)) === 'function' ? null : prev), ["values"]: (typeof (prev = (context?.["values"] ?? null)) === 'function' ? null : prev)})}) },
914
+ /* 52 */ (context) => { let prev; return (typeof (prev = (context?.["image"] ?? null)) === 'function' ? null : prev) },
915
+ /* 53 */ (context) => { let prev; return ({["$call"]: ({["name"]: (typeof (prev = (context?.["name"] ?? null)) === 'function' ? null : prev), ["args"]: (typeof (prev = (context?.["args"] ?? null)) === 'function' ? null : prev), ["distinct"]: (typeof (prev = (context?.["distinct"] ?? null)) === 'function' ? null : prev), ["star"]: (typeof (prev = (context?.["star"] ?? null)) === 'function' ? null : prev), ["orderBy"]: (typeof (prev = (context?.["orderBy"] ?? null)) === 'function' ? null : prev), ["filter"]: (typeof (prev = (context?.["filter"] ?? null)) === 'function' ? null : prev), ["over"]: (typeof (prev = (context?.["over"] ?? null)) === 'function' ? null : prev)})}) },
916
+ /* 54 */ (context) => { let prev; return ({["$ref"]: (typeof (prev = ((context) ?? null)) === 'function' ? null : prev)}) },
917
+ /* 55 */ (context) => { let prev; return ({["$param"]: null}) },
906
918
  /* 56 */ (context) => { let prev; return ({["$param"]: engine.methods["paramName"].method(((typeof (prev = (context?.["image"] ?? null)) === 'function' ? null : prev)), context)}) },
907
- /* 57 */ (context) => { let prev; return ({["op"]: (typeof (prev = (context?.["op"] ?? null)) === 'function' ? null : prev), ["args"]: [(typeof (prev = (context?.["right"] ?? null)) === 'function' ? null : prev)], ["negated"]: false}) },
908
- /* 58 */ (context) => { let prev; return ({["op"]: (typeof (prev = ((context?.["t"]?.["op"]) ?? null)) === 'function' ? null : prev), ["args"]: (typeof (prev = ((context?.["t"]?.["args"]) ?? null)) === 'function' ? null : prev), ["negated"]: (typeof (prev = (context?.["negated"] ?? null)) === 'function' ? null : prev)}) },
909
- /* 59 */ (context) => { let prev; return ({["op"]: "IS_NULL", ["args"]: []}) },
910
- /* 60 */ (context) => { let prev; return ({["op"]: "IS_TRUE", ["args"]: []}) },
911
- /* 61 */ (context) => { let prev; return ({["op"]: "IS_FALSE", ["args"]: []}) },
912
- /* 62 */ (context) => { let prev; return ({["op"]: "IS_DISTINCT", ["args"]: [(typeof (prev = (context?.["e"] ?? null)) === 'function' ? null : prev)]}) },
913
- /* 63 */ (context) => { let prev; return ({["op"]: (typeof (prev = ((context?.["t"]?.["op"]) ?? null)) === 'function' ? null : prev), ["args"]: (typeof (prev = ((context?.["t"]?.["args"]) ?? null)) === 'function' ? null : prev), ["negated"]: (typeof (prev = (context?.["negated"] ?? null)) === 'function' ? null : prev)}) },
914
- /* 64 */ (context) => { let prev; return [(typeof (prev = (context?.["cond"] ?? null)) === 'function' ? null : prev),(typeof (prev = (context?.["result"] ?? null)) === 'function' ? null : prev)] },
915
- /* 65 */ (context) => { let prev; return ({["partitionBy"]: (typeof (prev = (context?.["partitionBy"] ?? null)) === 'function' ? null : prev), ["orderBy"]: (typeof (prev = (context?.["orderBy"] ?? null)) === 'function' ? null : prev)}) },
916
- /* 66 */ (context) => { let prev; return ({["STRCAT"]: [(typeof (prev = (context?.["left"] ?? null)) === 'function' ? null : prev),(typeof (prev = (context?.["right"] ?? null)) === 'function' ? null : prev)]}) },
917
- /* 67 */ (context) => { let prev; return ({["op"]: "$inSub", ["args"]: [(typeof (prev = ((context) ?? null)) === 'function' ? null : prev)]}) },
919
+ /* 57 */ (context) => { let prev; return ({["$param"]: engine.methods["paramName"].method(((typeof (prev = (context?.["image"] ?? null)) === 'function' ? null : prev)), context)}) },
920
+ /* 58 */ (context) => { let prev; return ({["op"]: (typeof (prev = (context?.["op"] ?? null)) === 'function' ? null : prev), ["args"]: [(typeof (prev = (context?.["right"] ?? null)) === 'function' ? null : prev)], ["negated"]: false}) },
921
+ /* 59 */ (context) => { let prev; return ({["op"]: (typeof (prev = ((context?.["t"]?.["op"]) ?? null)) === 'function' ? null : prev), ["args"]: (typeof (prev = ((context?.["t"]?.["args"]) ?? null)) === 'function' ? null : prev), ["negated"]: (typeof (prev = (context?.["negated"] ?? null)) === 'function' ? null : prev)}) },
922
+ /* 60 */ (context) => { let prev; return ({["op"]: "IS_NULL", ["args"]: []}) },
923
+ /* 61 */ (context) => { let prev; return ({["op"]: "IS_TRUE", ["args"]: []}) },
924
+ /* 62 */ (context) => { let prev; return ({["op"]: "IS_FALSE", ["args"]: []}) },
925
+ /* 63 */ (context) => { let prev; return ({["op"]: "IS_DISTINCT", ["args"]: [(typeof (prev = (context?.["e"] ?? null)) === 'function' ? null : prev)]}) },
926
+ /* 64 */ (context) => { let prev; return ({["op"]: (typeof (prev = ((context?.["t"]?.["op"]) ?? null)) === 'function' ? null : prev), ["args"]: (typeof (prev = ((context?.["t"]?.["args"]) ?? null)) === 'function' ? null : prev), ["negated"]: (typeof (prev = (context?.["negated"] ?? null)) === 'function' ? null : prev)}) },
927
+ /* 65 */ (context) => { let prev; return [(typeof (prev = (context?.["cond"] ?? null)) === 'function' ? null : prev),(typeof (prev = (context?.["result"] ?? null)) === 'function' ? null : prev)] },
928
+ /* 66 */ (context) => { let prev; return ({["partitionBy"]: (typeof (prev = (context?.["partitionBy"] ?? null)) === 'function' ? null : prev), ["orderBy"]: (typeof (prev = (context?.["orderBy"] ?? null)) === 'function' ? null : prev)}) },
929
+ /* 67 */ (context) => { let prev; return ({["STRCAT"]: [(typeof (prev = (context?.["left"] ?? null)) === 'function' ? null : prev),(typeof (prev = (context?.["right"] ?? null)) === 'function' ? null : prev)]}) },
918
930
  /* 68 */ (context) => { let prev; return ({["op"]: "$inSub", ["args"]: [(typeof (prev = ((context) ?? null)) === 'function' ? null : prev)]}) },
919
- /* 69 */ (context) => { let prev; return ({["op"]: "IN", ["args"]: (typeof (prev = ((context) ?? null)) === 'function' ? null : prev)}) },
931
+ /* 69 */ (context) => { let prev; return ({["op"]: "$inSub", ["args"]: [(typeof (prev = ((context) ?? null)) === 'function' ? null : prev)]}) },
920
932
  /* 70 */ (context) => { let prev; return ({["op"]: "IN", ["args"]: (typeof (prev = ((context) ?? null)) === 'function' ? null : prev)}) },
921
- /* 71 */ (context) => { let prev; return ({["op"]: "BETWEEN", ["args"]: [(typeof (prev = (context?.["low"] ?? null)) === 'function' ? null : prev),(typeof (prev = (context?.["high"] ?? null)) === 'function' ? null : prev)]}) },
922
- /* 72 */ (context) => { let prev; return ({["op"]: (typeof (prev = (context?.["op"] ?? null)) === 'function' ? null : prev), ["args"]: [(typeof (prev = (context?.["p"] ?? null)) === 'function' ? null : prev)]}) }
933
+ /* 71 */ (context) => { let prev; return ({["op"]: "IN", ["args"]: (typeof (prev = ((context) ?? null)) === 'function' ? null : prev)}) },
934
+ /* 72 */ (context) => { let prev; return ({["op"]: "BETWEEN", ["args"]: [(typeof (prev = (context?.["low"] ?? null)) === 'function' ? null : prev),(typeof (prev = (context?.["high"] ?? null)) === 'function' ? null : prev)]}) },
935
+ /* 73 */ (context) => { let prev; return ({["op"]: (typeof (prev = (context?.["op"] ?? null)) === 'function' ? null : prev), ["args"]: [(typeof (prev = (context?.["p"] ?? null)) === 'function' ? null : prev)]}) }
923
936
  ]
924
937
 
925
938
  /**
@@ -985,38 +998,40 @@ const I = {
985
998
  "Over": 53,
986
999
  "Partition": 54,
987
1000
  "Filter": 55,
988
- "Number": 56,
989
- "String": 57,
990
- "QuotedIdent": 58,
991
- "BacktickIdent": 59,
992
- "Identifier": 60,
993
- "DollarParam": 61,
994
- "LongArrow": 62,
995
- "Arrow": 63,
996
- "DoubleColon": 64,
997
- "NamedParam": 65,
998
- "Concat": 66,
999
- "NotEq": 67,
1000
- "LtEq": 68,
1001
- "GtEq": 69,
1002
- "BangEq": 70,
1003
- "EqEq": 71,
1004
- "Lt": 72,
1005
- "Gt": 73,
1006
- "Eq": 74,
1007
- "Plus": 75,
1008
- "Minus": 76,
1009
- "Star": 77,
1010
- "Slash": 78,
1011
- "Percent": 79,
1012
- "LParen": 80,
1013
- "RParen": 81,
1014
- "LBracket": 82,
1015
- "RBracket": 83,
1016
- "Comma": 84,
1017
- "Dot": 85,
1018
- "Semicolon": 86,
1019
- "QMark": 87
1001
+ "For": 56,
1002
+ "Pivot": 57,
1003
+ "Number": 58,
1004
+ "String": 59,
1005
+ "QuotedIdent": 60,
1006
+ "BacktickIdent": 61,
1007
+ "Identifier": 62,
1008
+ "DollarParam": 63,
1009
+ "LongArrow": 64,
1010
+ "Arrow": 65,
1011
+ "DoubleColon": 66,
1012
+ "NamedParam": 67,
1013
+ "Concat": 68,
1014
+ "NotEq": 69,
1015
+ "LtEq": 70,
1016
+ "GtEq": 71,
1017
+ "BangEq": 72,
1018
+ "EqEq": 73,
1019
+ "Lt": 74,
1020
+ "Gt": 75,
1021
+ "Eq": 76,
1022
+ "Plus": 77,
1023
+ "Minus": 78,
1024
+ "Star": 79,
1025
+ "Slash": 80,
1026
+ "Percent": 81,
1027
+ "LParen": 82,
1028
+ "RParen": 83,
1029
+ "LBracket": 84,
1030
+ "RBracket": 85,
1031
+ "Comma": 86,
1032
+ "Dot": 87,
1033
+ "Semicolon": 88,
1034
+ "QMark": 89
1020
1035
  }
1021
1036
 
1022
1037
  // Script
@@ -1035,7 +1050,7 @@ for (;;) {
1035
1050
  const _6 = c.idx;
1036
1051
  let _8;
1037
1052
  const _9 = c.tokens[c.idx];
1038
- if (_9 !== undefined && (_9.id === 86 || (_9.id === undefined && _9.type === "Semicolon"))) { c.idx++; _8 = _9; }
1053
+ if (_9 !== undefined && (_9.id === 88 || (_9.id === undefined && _9.type === "Semicolon"))) { c.idx++; _8 = _9; }
1039
1054
  else { if (c.track) { E(c, "Semicolon"); } _8 = F; }
1040
1055
  if (_8 === F) { c.idx = _6; break; }
1041
1056
  if (c.idx === _6) P("many", _6);
@@ -1062,7 +1077,7 @@ L_18: {
1062
1077
  const _19 = c.idx;
1063
1078
  let _20;
1064
1079
  const _21 = c.tokens[c.idx];
1065
- if (_21 !== undefined && (_21.id === 86 || (_21.id === undefined && _21.type === "Semicolon"))) { c.idx++; _20 = _21; }
1080
+ if (_21 !== undefined && (_21.id === 88 || (_21.id === undefined && _21.type === "Semicolon"))) { c.idx++; _20 = _21; }
1066
1081
  else { if (c.track) { E(c, "Semicolon"); } _20 = F; }
1067
1082
  if (_20 === F) { c.idx = _19; _17 = F; break L_18; }
1068
1083
  let _22;
@@ -1106,7 +1121,7 @@ const _30 = c.tokens[c.idx];
1106
1121
  if (_30 === undefined) { if (c.track) { E(c, "With"); E(c, "LParen"); E(c, "Select"); E(c, "Values"); E(c, "Insert"); } _28 = F; break L_29; }
1107
1122
  const _31 = _30.id !== undefined ? _30.id : I[_30.type];
1108
1123
  switch (_31) {
1109
- case 46: case 80: case 3: case 38: {
1124
+ case 46: case 82: case 3: case 38: {
1110
1125
 
1111
1126
  const _33 = c.ruleDepth;
1112
1127
  if (c.track) { c.ruleNames[_33] = "Query"; c.ruleDepth = _33 + 1; }
@@ -1227,7 +1242,7 @@ L_76: {
1227
1242
  const _77 = c.idx;
1228
1243
  let _78;
1229
1244
  const _79 = c.tokens[c.idx];
1230
- if (_79 !== undefined && (_79.id === 80 || (_79.id === undefined && _79.type === "LParen"))) { c.idx++; _78 = _79; }
1245
+ if (_79 !== undefined && (_79.id === 82 || (_79.id === undefined && _79.type === "LParen"))) { c.idx++; _78 = _79; }
1231
1246
  else { if (c.track) { E(c, "LParen"); } _78 = F; }
1232
1247
  if (_78 === F) { c.idx = _77; _75 = F; break L_76; }
1233
1248
 
@@ -1245,7 +1260,7 @@ for (;;) {
1245
1260
  const _82 = c.idx;
1246
1261
  let _87;
1247
1262
  const _88 = c.tokens[c.idx];
1248
- if (_88 !== undefined && (_88.id === 84 || (_88.id === undefined && _88.type === "Comma"))) { c.idx++; _87 = _88; }
1263
+ if (_88 !== undefined && (_88.id === 86 || (_88.id === undefined && _88.type === "Comma"))) { c.idx++; _87 = _88; }
1249
1264
  else { if (c.track) { E(c, "Comma"); } _87 = F; }
1250
1265
  if (_87 === F) { c.idx = _82; break; }
1251
1266
  const _83 = c.idx;
@@ -1261,7 +1276,7 @@ _80.push(_89);
1261
1276
  if (_80 === F) { c.idx = _77; _75 = F; break L_76; }
1262
1277
  let _91;
1263
1278
  const _92 = c.tokens[c.idx];
1264
- if (_92 !== undefined && (_92.id === 81 || (_92.id === undefined && _92.type === "RParen"))) { c.idx++; _91 = _92; }
1279
+ if (_92 !== undefined && (_92.id === 83 || (_92.id === undefined && _92.type === "RParen"))) { c.idx++; _91 = _92; }
1265
1280
  else { if (c.track) { E(c, "RParen"); } _91 = F; }
1266
1281
  if (_91 === F) { c.idx = _77; _75 = F; break L_76; }
1267
1282
  _75 = _80;
@@ -1312,7 +1327,7 @@ for (;;) {
1312
1327
  const _104 = c.idx;
1313
1328
  let _109;
1314
1329
  const _110 = c.tokens[c.idx];
1315
- if (_110 !== undefined && (_110.id === 84 || (_110.id === undefined && _110.type === "Comma"))) { c.idx++; _109 = _110; }
1330
+ if (_110 !== undefined && (_110.id === 86 || (_110.id === undefined && _110.type === "Comma"))) { c.idx++; _109 = _110; }
1316
1331
  else { if (c.track) { E(c, "Comma"); } _109 = F; }
1317
1332
  if (_109 === F) { c.idx = _104; break; }
1318
1333
  const _105 = c.idx;
@@ -1398,7 +1413,7 @@ for (;;) {
1398
1413
  const _133 = c.idx;
1399
1414
  let _138;
1400
1415
  const _139 = c.tokens[c.idx];
1401
- if (_139 !== undefined && (_139.id === 84 || (_139.id === undefined && _139.type === "Comma"))) { c.idx++; _138 = _139; }
1416
+ if (_139 !== undefined && (_139.id === 86 || (_139.id === undefined && _139.type === "Comma"))) { c.idx++; _138 = _139; }
1402
1417
  else { if (c.track) { E(c, "Comma"); } _138 = F; }
1403
1418
  if (_138 === F) { c.idx = _133; break; }
1404
1419
  const _134 = c.idx;
@@ -1443,7 +1458,7 @@ if (_151 === F) { c.idx = _147; c.bindings = _150; _146 = F; break L_148; }
1443
1458
  let _154;
1444
1459
  L_155: {
1445
1460
  const _156 = c.tokens[c.idx];
1446
- if (_156 === undefined) { if (c.track) { E(c, "All"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "LParen"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _154 = F; break L_155; }
1461
+ if (_156 === undefined) { if (c.track) { E(c, "All"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "LParen"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Pivot"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _154 = F; break L_155; }
1447
1462
  const _157 = _156.id !== undefined ? _156.id : I[_156.type];
1448
1463
  switch (_157) {
1449
1464
  case 8: {
@@ -1460,7 +1475,7 @@ _158 = null;
1460
1475
  }
1461
1476
  _154 = _158; break L_155;
1462
1477
  }
1463
- case 76: case 75: case 39: case 40: case 14: case 80: case 50: case 41: case 51: case 52: case 60: case 58: case 59: case 19: case 20: case 56: case 57: case 87: case 61: case 65: {
1478
+ case 78: case 77: case 39: case 40: case 14: case 82: case 50: case 41: case 51: case 52: case 57: case 62: case 60: case 61: case 19: case 20: case 58: case 59: case 89: case 63: case 67: {
1464
1479
 
1465
1480
  const _164 = c.ruleDepth;
1466
1481
  if (c.track) { c.ruleNames[_164] = "Additive"; c.ruleDepth = _164 + 1; }
@@ -1468,7 +1483,7 @@ const _163 = R[14](c);
1468
1483
  if (c.track) c.ruleDepth = _164;
1469
1484
  _154 = _163; break L_155;
1470
1485
  }
1471
- default: { if (c.track) { E(c, "All"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "LParen"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _154 = F; break L_155; }
1486
+ default: { if (c.track) { E(c, "All"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "LParen"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Pivot"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _154 = F; break L_155; }
1472
1487
  }
1473
1488
  }
1474
1489
  if (_154 !== F) _149["n"] = _154;
@@ -1586,10 +1601,10 @@ R[9] = (c) => {
1586
1601
  let _202;
1587
1602
  L_203: {
1588
1603
  const _204 = c.tokens[c.idx];
1589
- if (_204 === undefined) { if (c.track) { E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Select"); E(c, "From"); E(c, "Where"); E(c, "As"); E(c, "Distinct"); E(c, "All"); E(c, "And"); E(c, "Or"); E(c, "Not"); E(c, "In"); E(c, "Is"); E(c, "Null"); E(c, "Like"); E(c, "Ilike"); E(c, "Between"); E(c, "Inner"); E(c, "Left"); E(c, "Right"); E(c, "Full"); E(c, "Outer"); E(c, "Cross"); E(c, "Join"); E(c, "On"); E(c, "Using"); E(c, "Group"); E(c, "By"); E(c, "Order"); E(c, "Asc"); E(c, "Desc"); E(c, "Nulls"); E(c, "Having"); E(c, "Limit"); E(c, "Offset"); E(c, "Insert"); E(c, "Into"); E(c, "Values"); E(c, "True"); E(c, "False"); E(c, "Case"); E(c, "When"); E(c, "Then"); E(c, "Else"); E(c, "End"); E(c, "With"); E(c, "Union"); E(c, "Except"); E(c, "Intersect"); E(c, "Exists"); E(c, "Cast"); E(c, "Extract"); E(c, "Over"); E(c, "Partition"); E(c, "Filter"); } _202 = F; break L_203; }
1604
+ if (_204 === undefined) { if (c.track) { E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Select"); E(c, "From"); E(c, "Where"); E(c, "As"); E(c, "Distinct"); E(c, "All"); E(c, "And"); E(c, "Or"); E(c, "Not"); E(c, "In"); E(c, "Is"); E(c, "Null"); E(c, "Like"); E(c, "Ilike"); E(c, "Between"); E(c, "Inner"); E(c, "Left"); E(c, "Right"); E(c, "Full"); E(c, "Outer"); E(c, "Cross"); E(c, "Join"); E(c, "On"); E(c, "Using"); E(c, "Group"); E(c, "By"); E(c, "Order"); E(c, "Asc"); E(c, "Desc"); E(c, "Nulls"); E(c, "Having"); E(c, "Limit"); E(c, "Offset"); E(c, "Insert"); E(c, "Into"); E(c, "Values"); E(c, "True"); E(c, "False"); E(c, "Case"); E(c, "When"); E(c, "Then"); E(c, "Else"); E(c, "End"); E(c, "With"); E(c, "Union"); E(c, "Except"); E(c, "Intersect"); E(c, "Exists"); E(c, "Cast"); E(c, "Extract"); E(c, "Over"); E(c, "Partition"); E(c, "Filter"); E(c, "For"); } _202 = F; break L_203; }
1590
1605
  const _205 = _204.id !== undefined ? _204.id : I[_204.type];
1591
1606
  switch (_205) {
1592
- case 60: case 58: case 59: {
1607
+ case 62: case 60: case 61: {
1593
1608
 
1594
1609
  const _207 = c.ruleDepth;
1595
1610
  if (c.track) { c.ruleNames[_207] = "Ident"; c.ruleDepth = _207 + 1; }
@@ -1597,17 +1612,17 @@ const _206 = R[15](c);
1597
1612
  if (c.track) c.ruleDepth = _207;
1598
1613
  _202 = _206; break L_203;
1599
1614
  }
1600
- case 3: 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: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: case 32: case 33: case 34: case 35: case 36: case 37: case 38: case 39: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: {
1615
+ case 3: 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: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: case 32: case 33: case 34: case 35: case 36: case 37: case 38: case 39: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: {
1601
1616
  let _209;
1602
1617
  const _210 = c.tokens[c.idx];
1603
1618
  let _211 = false;
1604
- if (_210 !== undefined) { switch (_210.id !== undefined ? _210.id : I[_210.type]) { case 3: 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: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: case 32: case 33: case 34: case 35: case 36: case 37: case 38: case 39: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: _211 = true; } }
1619
+ if (_210 !== undefined) { switch (_210.id !== undefined ? _210.id : I[_210.type]) { case 3: 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: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: case 32: case 33: case 34: case 35: case 36: case 37: case 38: case 39: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: _211 = true; } }
1605
1620
  if (_211) { c.idx++; _209 = _210; }
1606
- else { if (c.track) { E(c, "Select"); E(c, "From"); E(c, "Where"); E(c, "As"); E(c, "Distinct"); E(c, "All"); E(c, "And"); E(c, "Or"); E(c, "Not"); E(c, "In"); E(c, "Is"); E(c, "Null"); E(c, "Like"); E(c, "Ilike"); E(c, "Between"); E(c, "Inner"); E(c, "Left"); E(c, "Right"); E(c, "Full"); E(c, "Outer"); E(c, "Cross"); E(c, "Join"); E(c, "On"); E(c, "Using"); E(c, "Group"); E(c, "By"); E(c, "Order"); E(c, "Asc"); E(c, "Desc"); E(c, "Nulls"); E(c, "Having"); E(c, "Limit"); E(c, "Offset"); E(c, "Insert"); E(c, "Into"); E(c, "Values"); E(c, "True"); E(c, "False"); E(c, "Case"); E(c, "When"); E(c, "Then"); E(c, "Else"); E(c, "End"); E(c, "With"); E(c, "Union"); E(c, "Except"); E(c, "Intersect"); E(c, "Exists"); E(c, "Cast"); E(c, "Extract"); E(c, "Over"); E(c, "Partition"); E(c, "Filter"); } _209 = F; }
1621
+ else { if (c.track) { E(c, "Select"); E(c, "From"); E(c, "Where"); E(c, "As"); E(c, "Distinct"); E(c, "All"); E(c, "And"); E(c, "Or"); E(c, "Not"); E(c, "In"); E(c, "Is"); E(c, "Null"); E(c, "Like"); E(c, "Ilike"); E(c, "Between"); E(c, "Inner"); E(c, "Left"); E(c, "Right"); E(c, "Full"); E(c, "Outer"); E(c, "Cross"); E(c, "Join"); E(c, "On"); E(c, "Using"); E(c, "Group"); E(c, "By"); E(c, "Order"); E(c, "Asc"); E(c, "Desc"); E(c, "Nulls"); E(c, "Having"); E(c, "Limit"); E(c, "Offset"); E(c, "Insert"); E(c, "Into"); E(c, "Values"); E(c, "True"); E(c, "False"); E(c, "Case"); E(c, "When"); E(c, "Then"); E(c, "Else"); E(c, "End"); E(c, "With"); E(c, "Union"); E(c, "Except"); E(c, "Intersect"); E(c, "Exists"); E(c, "Cast"); E(c, "Extract"); E(c, "Over"); E(c, "Partition"); E(c, "Filter"); E(c, "For"); } _209 = F; }
1607
1622
  const _208 = _209 === F ? F : H[7](_209, c);
1608
1623
  _202 = _208; break L_203;
1609
1624
  }
1610
- default: { if (c.track) { E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Select"); E(c, "From"); E(c, "Where"); E(c, "As"); E(c, "Distinct"); E(c, "All"); E(c, "And"); E(c, "Or"); E(c, "Not"); E(c, "In"); E(c, "Is"); E(c, "Null"); E(c, "Like"); E(c, "Ilike"); E(c, "Between"); E(c, "Inner"); E(c, "Left"); E(c, "Right"); E(c, "Full"); E(c, "Outer"); E(c, "Cross"); E(c, "Join"); E(c, "On"); E(c, "Using"); E(c, "Group"); E(c, "By"); E(c, "Order"); E(c, "Asc"); E(c, "Desc"); E(c, "Nulls"); E(c, "Having"); E(c, "Limit"); E(c, "Offset"); E(c, "Insert"); E(c, "Into"); E(c, "Values"); E(c, "True"); E(c, "False"); E(c, "Case"); E(c, "When"); E(c, "Then"); E(c, "Else"); E(c, "End"); E(c, "With"); E(c, "Union"); E(c, "Except"); E(c, "Intersect"); E(c, "Exists"); E(c, "Cast"); E(c, "Extract"); E(c, "Over"); E(c, "Partition"); E(c, "Filter"); } _202 = F; break L_203; }
1625
+ default: { if (c.track) { E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Select"); E(c, "From"); E(c, "Where"); E(c, "As"); E(c, "Distinct"); E(c, "All"); E(c, "And"); E(c, "Or"); E(c, "Not"); E(c, "In"); E(c, "Is"); E(c, "Null"); E(c, "Like"); E(c, "Ilike"); E(c, "Between"); E(c, "Inner"); E(c, "Left"); E(c, "Right"); E(c, "Full"); E(c, "Outer"); E(c, "Cross"); E(c, "Join"); E(c, "On"); E(c, "Using"); E(c, "Group"); E(c, "By"); E(c, "Order"); E(c, "Asc"); E(c, "Desc"); E(c, "Nulls"); E(c, "Having"); E(c, "Limit"); E(c, "Offset"); E(c, "Insert"); E(c, "Into"); E(c, "Values"); E(c, "True"); E(c, "False"); E(c, "Case"); E(c, "When"); E(c, "Then"); E(c, "Else"); E(c, "End"); E(c, "With"); E(c, "Union"); E(c, "Except"); E(c, "Intersect"); E(c, "Exists"); E(c, "Cast"); E(c, "Extract"); E(c, "Over"); E(c, "Partition"); E(c, "Filter"); E(c, "For"); } _202 = F; break L_203; }
1611
1626
  }
1612
1627
  }
1613
1628
  return _202;
@@ -1641,7 +1656,7 @@ L_224: {
1641
1656
  const _225 = c.idx;
1642
1657
  let _226;
1643
1658
  const _227 = c.tokens[c.idx];
1644
- if (_227 !== undefined && (_227.id === 80 || (_227.id === undefined && _227.type === "LParen"))) { c.idx++; _226 = _227; }
1659
+ if (_227 !== undefined && (_227.id === 82 || (_227.id === undefined && _227.type === "LParen"))) { c.idx++; _226 = _227; }
1645
1660
  else { if (c.track) { E(c, "LParen"); } _226 = F; }
1646
1661
  if (_226 === F) { c.idx = _225; _223 = F; break L_224; }
1647
1662
 
@@ -1652,7 +1667,7 @@ if (c.track) c.ruleDepth = _229;
1652
1667
  if (_228 === F) { c.idx = _225; _223 = F; break L_224; }
1653
1668
  let _230;
1654
1669
  const _231 = c.tokens[c.idx];
1655
- if (_231 !== undefined && (_231.id === 81 || (_231.id === undefined && _231.type === "RParen"))) { c.idx++; _230 = _231; }
1670
+ if (_231 !== undefined && (_231.id === 83 || (_231.id === undefined && _231.type === "RParen"))) { c.idx++; _230 = _231; }
1656
1671
  else { if (c.track) { E(c, "RParen"); } _230 = F; }
1657
1672
  if (_230 === F) { c.idx = _225; _223 = F; break L_224; }
1658
1673
  _223 = _228;
@@ -1692,14 +1707,14 @@ const _239 = R[18](c);
1692
1707
  if (c.track) c.ruleDepth = _240;
1693
1708
  _233 = _239; break L_234;
1694
1709
  }
1695
- case 80: {
1710
+ case 82: {
1696
1711
 
1697
1712
  let _241;
1698
1713
  L_242: {
1699
1714
  const _243 = c.idx;
1700
1715
  let _244;
1701
1716
  const _245 = c.tokens[c.idx];
1702
- if (_245 !== undefined && (_245.id === 80 || (_245.id === undefined && _245.type === "LParen"))) { c.idx++; _244 = _245; }
1717
+ if (_245 !== undefined && (_245.id === 82 || (_245.id === undefined && _245.type === "LParen"))) { c.idx++; _244 = _245; }
1703
1718
  else { if (c.track) { E(c, "LParen"); } _244 = F; }
1704
1719
  if (_244 === F) { c.idx = _243; _241 = F; break L_242; }
1705
1720
 
@@ -1710,7 +1725,7 @@ if (c.track) c.ruleDepth = _247;
1710
1725
  if (_246 === F) { c.idx = _243; _241 = F; break L_242; }
1711
1726
  let _248;
1712
1727
  const _249 = c.tokens[c.idx];
1713
- if (_249 !== undefined && (_249.id === 81 || (_249.id === undefined && _249.type === "RParen"))) { c.idx++; _248 = _249; }
1728
+ if (_249 !== undefined && (_249.id === 83 || (_249.id === undefined && _249.type === "RParen"))) { c.idx++; _248 = _249; }
1714
1729
  else { if (c.track) { E(c, "RParen"); } _248 = F; }
1715
1730
  if (_248 === F) { c.idx = _243; _241 = F; break L_242; }
1716
1731
  _241 = _246;
@@ -1923,26 +1938,26 @@ const _323 = c.tokens[c.idx];
1923
1938
  if (_323 === undefined) { if (c.track) { E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); } _321 = F; break L_322; }
1924
1939
  const _324 = _323.id !== undefined ? _323.id : I[_323.type];
1925
1940
  switch (_324) {
1926
- case 60: {
1941
+ case 62: {
1927
1942
  let _326;
1928
1943
  const _327 = c.tokens[c.idx];
1929
- if (_327 !== undefined && (_327.id === 60 || (_327.id === undefined && _327.type === "Identifier"))) { c.idx++; _326 = _327; }
1944
+ if (_327 !== undefined && (_327.id === 62 || (_327.id === undefined && _327.type === "Identifier"))) { c.idx++; _326 = _327; }
1930
1945
  else { if (c.track) { E(c, "Identifier"); } _326 = F; }
1931
1946
  const _325 = _326 === F ? F : H[11](_326, c);
1932
1947
  _321 = _325; break L_322;
1933
1948
  }
1934
- case 58: {
1949
+ case 60: {
1935
1950
  let _329;
1936
1951
  const _330 = c.tokens[c.idx];
1937
- if (_330 !== undefined && (_330.id === 58 || (_330.id === undefined && _330.type === "QuotedIdent"))) { c.idx++; _329 = _330; }
1952
+ if (_330 !== undefined && (_330.id === 60 || (_330.id === undefined && _330.type === "QuotedIdent"))) { c.idx++; _329 = _330; }
1938
1953
  else { if (c.track) { E(c, "QuotedIdent"); } _329 = F; }
1939
1954
  const _328 = _329 === F ? F : H[12](_329, c);
1940
1955
  _321 = _328; break L_322;
1941
1956
  }
1942
- case 59: {
1957
+ case 61: {
1943
1958
  let _332;
1944
1959
  const _333 = c.tokens[c.idx];
1945
- if (_333 !== undefined && (_333.id === 59 || (_333.id === undefined && _333.type === "BacktickIdent"))) { c.idx++; _332 = _333; }
1960
+ if (_333 !== undefined && (_333.id === 61 || (_333.id === undefined && _333.type === "BacktickIdent"))) { c.idx++; _332 = _333; }
1946
1961
  else { if (c.track) { E(c, "BacktickIdent"); } _332 = F; }
1947
1962
  const _331 = _332 === F ? F : H[13](_332, c);
1948
1963
  _321 = _331; break L_322;
@@ -1962,14 +1977,14 @@ const _336 = c.tokens[c.idx];
1962
1977
  if (_336 === undefined) { if (c.track) { E(c, "Dot"); E(c, "LBracket"); } _334 = F; break L_335; }
1963
1978
  const _337 = _336.id !== undefined ? _336.id : I[_336.type];
1964
1979
  switch (_337) {
1965
- case 85: {
1980
+ case 87: {
1966
1981
 
1967
1982
  let _338;
1968
1983
  L_339: {
1969
1984
  const _340 = c.idx;
1970
1985
  let _341;
1971
1986
  const _342 = c.tokens[c.idx];
1972
- if (_342 !== undefined && (_342.id === 85 || (_342.id === undefined && _342.type === "Dot"))) { c.idx++; _341 = _342; }
1987
+ if (_342 !== undefined && (_342.id === 87 || (_342.id === undefined && _342.type === "Dot"))) { c.idx++; _341 = _342; }
1973
1988
  else { if (c.track) { E(c, "Dot"); } _341 = F; }
1974
1989
  if (_341 === F) { c.idx = _340; _338 = F; break L_339; }
1975
1990
 
@@ -1982,14 +1997,14 @@ _338 = _343;
1982
1997
  }
1983
1998
  _334 = _338; break L_335;
1984
1999
  }
1985
- case 82: {
2000
+ case 84: {
1986
2001
 
1987
2002
  let _345;
1988
2003
  L_346: {
1989
2004
  const _347 = c.idx;
1990
2005
  let _348;
1991
2006
  const _349 = c.tokens[c.idx];
1992
- if (_349 !== undefined && (_349.id === 82 || (_349.id === undefined && _349.type === "LBracket"))) { c.idx++; _348 = _349; }
2007
+ if (_349 !== undefined && (_349.id === 84 || (_349.id === undefined && _349.type === "LBracket"))) { c.idx++; _348 = _349; }
1993
2008
  else { if (c.track) { E(c, "LBracket"); } _348 = F; }
1994
2009
  if (_348 === F) { c.idx = _347; _345 = F; break L_346; }
1995
2010
 
@@ -1999,7 +2014,7 @@ const _352 = c.tokens[c.idx];
1999
2014
  if (_352 === undefined) { if (c.track) { E(c, "Number"); E(c, "String"); E(c, "Star"); } _350 = F; break L_351; }
2000
2015
  const _353 = _352.id !== undefined ? _352.id : I[_352.type];
2001
2016
  switch (_353) {
2002
- case 56: {
2017
+ case 58: {
2003
2018
 
2004
2019
  const _355 = c.ruleDepth;
2005
2020
  if (c.track) { c.ruleNames[_355] = "NumberLiteral"; c.ruleDepth = _355 + 1; }
@@ -2007,7 +2022,7 @@ const _354 = R[22](c);
2007
2022
  if (c.track) c.ruleDepth = _355;
2008
2023
  _350 = _354; break L_351;
2009
2024
  }
2010
- case 57: {
2025
+ case 59: {
2011
2026
 
2012
2027
  const _357 = c.ruleDepth;
2013
2028
  if (c.track) { c.ruleNames[_357] = "StringLiteral"; c.ruleDepth = _357 + 1; }
@@ -2015,14 +2030,14 @@ const _356 = R[23](c);
2015
2030
  if (c.track) c.ruleDepth = _357;
2016
2031
  _350 = _356; break L_351;
2017
2032
  }
2018
- case 77: {
2033
+ case 79: {
2019
2034
 
2020
2035
  let _358;
2021
2036
  L_359: {
2022
2037
  const _360 = c.idx;
2023
2038
  let _361;
2024
2039
  const _362 = c.tokens[c.idx];
2025
- if (_362 !== undefined && (_362.id === 77 || (_362.id === undefined && _362.type === "Star"))) { c.idx++; _361 = _362; }
2040
+ if (_362 !== undefined && (_362.id === 79 || (_362.id === undefined && _362.type === "Star"))) { c.idx++; _361 = _362; }
2026
2041
  else { if (c.track) { E(c, "Star"); } _361 = F; }
2027
2042
  if (_361 === F) { c.idx = _360; _358 = F; break L_359; }
2028
2043
  _358 = "[*]";
@@ -2035,7 +2050,7 @@ default: { if (c.track) { E(c, "Number"); E(c, "String"); E(c, "Star"); } _350 =
2035
2050
  if (_350 === F) { c.idx = _347; _345 = F; break L_346; }
2036
2051
  let _363;
2037
2052
  const _364 = c.tokens[c.idx];
2038
- if (_364 !== undefined && (_364.id === 83 || (_364.id === undefined && _364.type === "RBracket"))) { c.idx++; _363 = _364; }
2053
+ if (_364 !== undefined && (_364.id === 85 || (_364.id === undefined && _364.type === "RBracket"))) { c.idx++; _363 = _364; }
2039
2054
  else { if (c.track) { E(c, "RBracket"); } _363 = F; }
2040
2055
  if (_363 === F) { c.idx = _347; _345 = F; break L_346; }
2041
2056
  _345 = _350;
@@ -2099,7 +2114,7 @@ for (;;) {
2099
2114
  const _384 = c.idx;
2100
2115
  let _389;
2101
2116
  const _390 = c.tokens[c.idx];
2102
- if (_390 !== undefined && (_390.id === 84 || (_390.id === undefined && _390.type === "Comma"))) { c.idx++; _389 = _390; }
2117
+ if (_390 !== undefined && (_390.id === 86 || (_390.id === undefined && _390.type === "Comma"))) { c.idx++; _389 = _390; }
2103
2118
  else { if (c.track) { E(c, "Comma"); } _389 = F; }
2104
2119
  if (_389 === F) { c.idx = _384; break; }
2105
2120
  const _385 = c.idx;
@@ -2142,7 +2157,7 @@ for (;;) {
2142
2157
  const _403 = c.idx;
2143
2158
  let _408;
2144
2159
  const _409 = c.tokens[c.idx];
2145
- if (_409 !== undefined && (_409.id === 84 || (_409.id === undefined && _409.type === "Comma"))) { c.idx++; _408 = _409; }
2160
+ if (_409 !== undefined && (_409.id === 86 || (_409.id === undefined && _409.type === "Comma"))) { c.idx++; _408 = _409; }
2146
2161
  else { if (c.track) { E(c, "Comma"); } _408 = F; }
2147
2162
  if (_408 === F) { c.idx = _403; break; }
2148
2163
  const _404 = c.idx;
@@ -2220,7 +2235,7 @@ for (;;) {
2220
2235
  const _434 = c.idx;
2221
2236
  let _439;
2222
2237
  const _440 = c.tokens[c.idx];
2223
- if (_440 !== undefined && (_440.id === 84 || (_440.id === undefined && _440.type === "Comma"))) { c.idx++; _439 = _440; }
2238
+ if (_440 !== undefined && (_440.id === 86 || (_440.id === undefined && _440.type === "Comma"))) { c.idx++; _439 = _440; }
2224
2239
  else { if (c.track) { E(c, "Comma"); } _439 = F; }
2225
2240
  if (_439 === F) { c.idx = _434; break; }
2226
2241
  const _435 = c.idx;
@@ -2302,7 +2317,7 @@ for (;;) {
2302
2317
  const _464 = c.idx;
2303
2318
  let _469;
2304
2319
  const _470 = c.tokens[c.idx];
2305
- if (_470 !== undefined && (_470.id === 84 || (_470.id === undefined && _470.type === "Comma"))) { c.idx++; _469 = _470; }
2320
+ if (_470 !== undefined && (_470.id === 86 || (_470.id === undefined && _470.type === "Comma"))) { c.idx++; _469 = _470; }
2306
2321
  else { if (c.track) { E(c, "Comma"); } _469 = F; }
2307
2322
  if (_469 === F) { c.idx = _464; break; }
2308
2323
  const _465 = c.idx;
@@ -2357,28 +2372,28 @@ const _485 = c.tokens[c.idx];
2357
2372
  if (_485 === undefined) { if (c.track) { E(c, "Plus"); E(c, "Minus"); } _483 = F; break L_484; }
2358
2373
  const _486 = _485.id !== undefined ? _485.id : I[_485.type];
2359
2374
  switch (_486) {
2360
- case 75: {
2375
+ case 77: {
2361
2376
 
2362
2377
  let _487;
2363
2378
  L_488: {
2364
2379
  const _489 = c.idx;
2365
2380
  let _490;
2366
2381
  const _491 = c.tokens[c.idx];
2367
- if (_491 !== undefined && (_491.id === 75 || (_491.id === undefined && _491.type === "Plus"))) { c.idx++; _490 = _491; }
2382
+ if (_491 !== undefined && (_491.id === 77 || (_491.id === undefined && _491.type === "Plus"))) { c.idx++; _490 = _491; }
2368
2383
  else { if (c.track) { E(c, "Plus"); } _490 = F; }
2369
2384
  if (_490 === F) { c.idx = _489; _487 = F; break L_488; }
2370
2385
  _487 = "ADD";
2371
2386
  }
2372
2387
  _483 = _487; break L_484;
2373
2388
  }
2374
- case 76: {
2389
+ case 78: {
2375
2390
 
2376
2391
  let _492;
2377
2392
  L_493: {
2378
2393
  const _494 = c.idx;
2379
2394
  let _495;
2380
2395
  const _496 = c.tokens[c.idx];
2381
- if (_496 !== undefined && (_496.id === 76 || (_496.id === undefined && _496.type === "Minus"))) { c.idx++; _495 = _496; }
2396
+ if (_496 !== undefined && (_496.id === 78 || (_496.id === undefined && _496.type === "Minus"))) { c.idx++; _495 = _496; }
2382
2397
  else { if (c.track) { E(c, "Minus"); } _495 = F; }
2383
2398
  if (_495 === F) { c.idx = _494; _492 = F; break L_493; }
2384
2399
  _492 = "SUB";
@@ -2421,9 +2436,9 @@ const _501 = c.tokens[_500];
2421
2436
  if (_501 === undefined) break;
2422
2437
  let _502;
2423
2438
  switch (_501.id !== undefined ? _501.id : I[_501.type]) {
2424
- case 66: _502 = 0; break;
2425
- case 75: case 76: _502 = 1; break;
2426
- case 77: case 78: case 79: _502 = 2; break;
2439
+ case 68: _502 = 0; break;
2440
+ case 77: case 78: _502 = 1; break;
2441
+ case 79: case 80: case 81: _502 = 2; break;
2427
2442
  default: break L_499;
2428
2443
  }
2429
2444
  if (_502 < from) break;
@@ -2431,7 +2446,7 @@ switch (_502) {
2431
2446
  case 0: {
2432
2447
  let _509;
2433
2448
  const _510 = c.tokens[c.idx];
2434
- if (_510 !== undefined && (_510.id === 66 || (_510.id === undefined && _510.type === "Concat"))) { c.idx++; _509 = _510; }
2449
+ if (_510 !== undefined && (_510.id === 68 || (_510.id === undefined && _510.type === "Concat"))) { c.idx++; _509 = _510; }
2435
2450
  else { if (c.track) { E(c, "Concat"); } _509 = F; }
2436
2451
  if (_509 === F) { c.idx = _500; break L_499; }
2437
2452
  const _511 = R[21](c, 1);
@@ -2449,28 +2464,28 @@ const _514 = c.tokens[c.idx];
2449
2464
  if (_514 === undefined) { if (c.track) { E(c, "Plus"); E(c, "Minus"); } _512 = F; break L_513; }
2450
2465
  const _515 = _514.id !== undefined ? _514.id : I[_514.type];
2451
2466
  switch (_515) {
2452
- case 75: {
2467
+ case 77: {
2453
2468
 
2454
2469
  let _516;
2455
2470
  L_517: {
2456
2471
  const _518 = c.idx;
2457
2472
  let _519;
2458
2473
  const _520 = c.tokens[c.idx];
2459
- if (_520 !== undefined && (_520.id === 75 || (_520.id === undefined && _520.type === "Plus"))) { c.idx++; _519 = _520; }
2474
+ if (_520 !== undefined && (_520.id === 77 || (_520.id === undefined && _520.type === "Plus"))) { c.idx++; _519 = _520; }
2460
2475
  else { if (c.track) { E(c, "Plus"); } _519 = F; }
2461
2476
  if (_519 === F) { c.idx = _518; _516 = F; break L_517; }
2462
2477
  _516 = "ADD";
2463
2478
  }
2464
2479
  _512 = _516; break L_513;
2465
2480
  }
2466
- case 76: {
2481
+ case 78: {
2467
2482
 
2468
2483
  let _521;
2469
2484
  L_522: {
2470
2485
  const _523 = c.idx;
2471
2486
  let _524;
2472
2487
  const _525 = c.tokens[c.idx];
2473
- if (_525 !== undefined && (_525.id === 76 || (_525.id === undefined && _525.type === "Minus"))) { c.idx++; _524 = _525; }
2488
+ if (_525 !== undefined && (_525.id === 78 || (_525.id === undefined && _525.type === "Minus"))) { c.idx++; _524 = _525; }
2474
2489
  else { if (c.track) { E(c, "Minus"); } _524 = F; }
2475
2490
  if (_524 === F) { c.idx = _523; _521 = F; break L_522; }
2476
2491
  _521 = "SUB";
@@ -2496,42 +2511,42 @@ const _529 = c.tokens[c.idx];
2496
2511
  if (_529 === undefined) { if (c.track) { E(c, "Star"); E(c, "Slash"); E(c, "Percent"); } _527 = F; break L_528; }
2497
2512
  const _530 = _529.id !== undefined ? _529.id : I[_529.type];
2498
2513
  switch (_530) {
2499
- case 77: {
2514
+ case 79: {
2500
2515
 
2501
2516
  let _531;
2502
2517
  L_532: {
2503
2518
  const _533 = c.idx;
2504
2519
  let _534;
2505
2520
  const _535 = c.tokens[c.idx];
2506
- if (_535 !== undefined && (_535.id === 77 || (_535.id === undefined && _535.type === "Star"))) { c.idx++; _534 = _535; }
2521
+ if (_535 !== undefined && (_535.id === 79 || (_535.id === undefined && _535.type === "Star"))) { c.idx++; _534 = _535; }
2507
2522
  else { if (c.track) { E(c, "Star"); } _534 = F; }
2508
2523
  if (_534 === F) { c.idx = _533; _531 = F; break L_532; }
2509
2524
  _531 = "MUL";
2510
2525
  }
2511
2526
  _527 = _531; break L_528;
2512
2527
  }
2513
- case 78: {
2528
+ case 80: {
2514
2529
 
2515
2530
  let _536;
2516
2531
  L_537: {
2517
2532
  const _538 = c.idx;
2518
2533
  let _539;
2519
2534
  const _540 = c.tokens[c.idx];
2520
- if (_540 !== undefined && (_540.id === 78 || (_540.id === undefined && _540.type === "Slash"))) { c.idx++; _539 = _540; }
2535
+ if (_540 !== undefined && (_540.id === 80 || (_540.id === undefined && _540.type === "Slash"))) { c.idx++; _539 = _540; }
2521
2536
  else { if (c.track) { E(c, "Slash"); } _539 = F; }
2522
2537
  if (_539 === F) { c.idx = _538; _536 = F; break L_537; }
2523
2538
  _536 = "DIV";
2524
2539
  }
2525
2540
  _527 = _536; break L_528;
2526
2541
  }
2527
- case 79: {
2542
+ case 81: {
2528
2543
 
2529
2544
  let _541;
2530
2545
  L_542: {
2531
2546
  const _543 = c.idx;
2532
2547
  let _544;
2533
2548
  const _545 = c.tokens[c.idx];
2534
- if (_545 !== undefined && (_545.id === 79 || (_545.id === undefined && _545.type === "Percent"))) { c.idx++; _544 = _545; }
2549
+ if (_545 !== undefined && (_545.id === 81 || (_545.id === undefined && _545.type === "Percent"))) { c.idx++; _544 = _545; }
2535
2550
  else { if (c.track) { E(c, "Percent"); } _544 = F; }
2536
2551
  if (_544 === F) { c.idx = _543; _541 = F; break L_542; }
2537
2552
  _541 = "MOD";
@@ -2558,7 +2573,7 @@ return _503;
2558
2573
  R[22] = (c) => {
2559
2574
  let _548;
2560
2575
  const _549 = c.tokens[c.idx];
2561
- if (_549 !== undefined && (_549.id === 56 || (_549.id === undefined && _549.type === "Number"))) { c.idx++; _548 = _549; }
2576
+ if (_549 !== undefined && (_549.id === 58 || (_549.id === undefined && _549.type === "Number"))) { c.idx++; _548 = _549; }
2562
2577
  else { if (c.track) { E(c, "Number"); } _548 = F; }
2563
2578
  const _547 = _548 === F ? F : H[20](_548, c);
2564
2579
  return _547;
@@ -2568,7 +2583,7 @@ return _547;
2568
2583
  R[23] = (c) => {
2569
2584
  let _551;
2570
2585
  const _552 = c.tokens[c.idx];
2571
- if (_552 !== undefined && (_552.id === 57 || (_552.id === undefined && _552.type === "String"))) { c.idx++; _551 = _552; }
2586
+ if (_552 !== undefined && (_552.id === 59 || (_552.id === undefined && _552.type === "String"))) { c.idx++; _551 = _552; }
2572
2587
  else { if (c.track) { E(c, "String"); } _551 = F; }
2573
2588
  const _550 = _551 === F ? F : H[21](_551, c);
2574
2589
  return _550;
@@ -2580,10 +2595,10 @@ R[24] = (c) => {
2580
2595
  let _553;
2581
2596
  L_554: {
2582
2597
  const _555 = c.tokens[c.idx];
2583
- if (_555 === undefined) { if (c.track) { E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Star"); E(c, "Not"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "LParen"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _553 = F; break L_554; }
2598
+ if (_555 === undefined) { if (c.track) { E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Star"); E(c, "Not"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "LParen"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Pivot"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _553 = F; break L_554; }
2584
2599
  const _556 = _555.id !== undefined ? _555.id : I[_555.type];
2585
2600
  switch (_556) {
2586
- case 60: case 58: case 59: {
2601
+ case 62: case 60: case 61: {
2587
2602
  let _557;
2588
2603
  L_558: {
2589
2604
  const _559 = c.idx;
@@ -2591,8 +2606,8 @@ let _560 = 3;
2591
2606
  if (!c.track) {
2592
2607
  const _561 = c.tokens[_559 + 1];
2593
2608
  switch (_561 === undefined ? -1 : (_561.id !== undefined ? _561.id : I[_561.type])) {
2594
- case 85: _560 = 3; break;
2595
- case 80: case 82: _560 = 2; break;
2609
+ case 87: _560 = 3; break;
2610
+ case 82: case 84: _560 = 2; break;
2596
2611
  default: _560 = 2; break;
2597
2612
  }
2598
2613
  }
@@ -2614,12 +2629,12 @@ const _567 = _568;
2614
2629
  if (_567 === F) { c.idx = _563; c.bindings = _566; _562 = F; break L_564; }
2615
2630
  let _570;
2616
2631
  const _571 = c.tokens[c.idx];
2617
- if (_571 !== undefined && (_571.id === 85 || (_571.id === undefined && _571.type === "Dot"))) { c.idx++; _570 = _571; }
2632
+ if (_571 !== undefined && (_571.id === 87 || (_571.id === undefined && _571.type === "Dot"))) { c.idx++; _570 = _571; }
2618
2633
  else { if (c.track) { E(c, "Dot"); } _570 = F; }
2619
2634
  if (_570 === F) { c.idx = _563; c.bindings = _566; _562 = F; break L_564; }
2620
2635
  let _572;
2621
2636
  const _573 = c.tokens[c.idx];
2622
- if (_573 !== undefined && (_573.id === 77 || (_573.id === undefined && _573.type === "Star"))) { c.idx++; _572 = _573; }
2637
+ if (_573 !== undefined && (_573.id === 79 || (_573.id === undefined && _573.type === "Star"))) { c.idx++; _572 = _573; }
2623
2638
  else { if (c.track) { E(c, "Star"); } _572 = F; }
2624
2639
  if (_572 === F) { c.idx = _563; c.bindings = _566; _562 = F; break L_564; }
2625
2640
  const _574 = H[22](_565, c);
@@ -2669,7 +2684,7 @@ _557 = F;
2669
2684
  }
2670
2685
  _553 = _557; break L_554;
2671
2686
  }
2672
- case 77: {
2687
+ case 79: {
2673
2688
 
2674
2689
  let _589;
2675
2690
  L_591: {
@@ -2679,7 +2694,7 @@ const _592 = {};
2679
2694
  c.bindings = _592;
2680
2695
  let _594;
2681
2696
  const _595 = c.tokens[c.idx];
2682
- if (_595 !== undefined && (_595.id === 77 || (_595.id === undefined && _595.type === "Star"))) { c.idx++; _594 = _595; }
2697
+ if (_595 !== undefined && (_595.id === 79 || (_595.id === undefined && _595.type === "Star"))) { c.idx++; _594 = _595; }
2683
2698
  else { if (c.track) { E(c, "Star"); } _594 = F; }
2684
2699
  if (_594 === F) { c.idx = _590; c.bindings = _593; _589 = F; break L_591; }
2685
2700
  const _596 = H[24](_592, c);
@@ -2688,7 +2703,7 @@ _589 = _596;
2688
2703
  }
2689
2704
  _553 = _589; break L_554;
2690
2705
  }
2691
- case 11: case 76: case 75: case 39: case 40: case 14: case 80: case 50: case 41: case 51: case 52: case 19: case 20: case 56: case 57: case 87: case 61: case 65: {
2706
+ case 11: case 78: case 77: case 39: case 40: case 14: case 82: case 50: case 41: case 51: case 52: case 57: case 19: case 20: case 58: case 59: case 89: case 63: case 67: {
2692
2707
 
2693
2708
  let _597;
2694
2709
  L_599: {
@@ -2723,7 +2738,7 @@ _597 = _610;
2723
2738
  }
2724
2739
  _553 = _597; break L_554;
2725
2740
  }
2726
- default: { if (c.track) { E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Star"); E(c, "Not"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "LParen"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _553 = F; break L_554; }
2741
+ default: { if (c.track) { E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Star"); E(c, "Not"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "LParen"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Pivot"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _553 = F; break L_554; }
2727
2742
  }
2728
2743
  }
2729
2744
  return _553;
@@ -2779,7 +2794,7 @@ L_627: {
2779
2794
  const _628 = c.idx;
2780
2795
  let _629;
2781
2796
  const _630 = c.tokens[c.idx];
2782
- if (_630 !== undefined && (_630.id === 80 || (_630.id === undefined && _630.type === "LParen"))) { c.idx++; _629 = _630; }
2797
+ if (_630 !== undefined && (_630.id === 82 || (_630.id === undefined && _630.type === "LParen"))) { c.idx++; _629 = _630; }
2783
2798
  else { if (c.track) { E(c, "LParen"); } _629 = F; }
2784
2799
  if (_629 === F) { c.idx = _628; _626 = F; break L_627; }
2785
2800
 
@@ -2797,7 +2812,7 @@ for (;;) {
2797
2812
  const _633 = c.idx;
2798
2813
  let _638;
2799
2814
  const _639 = c.tokens[c.idx];
2800
- if (_639 !== undefined && (_639.id === 84 || (_639.id === undefined && _639.type === "Comma"))) { c.idx++; _638 = _639; }
2815
+ if (_639 !== undefined && (_639.id === 86 || (_639.id === undefined && _639.type === "Comma"))) { c.idx++; _638 = _639; }
2801
2816
  else { if (c.track) { E(c, "Comma"); } _638 = F; }
2802
2817
  if (_638 === F) { c.idx = _633; break; }
2803
2818
  const _634 = c.idx;
@@ -2813,7 +2828,7 @@ _631.push(_640);
2813
2828
  if (_631 === F) { c.idx = _628; _626 = F; break L_627; }
2814
2829
  let _642;
2815
2830
  const _643 = c.tokens[c.idx];
2816
- if (_643 !== undefined && (_643.id === 81 || (_643.id === undefined && _643.type === "RParen"))) { c.idx++; _642 = _643; }
2831
+ if (_643 !== undefined && (_643.id === 83 || (_643.id === undefined && _643.type === "RParen"))) { c.idx++; _642 = _643; }
2817
2832
  else { if (c.track) { E(c, "RParen"); } _642 = F; }
2818
2833
  if (_642 === F) { c.idx = _628; _626 = F; break L_627; }
2819
2834
  _626 = _631;
@@ -2843,28 +2858,28 @@ const _653 = c.tokens[c.idx];
2843
2858
  if (_653 === undefined) { if (c.track) { E(c, "Minus"); E(c, "Plus"); } _651 = F; break L_652; }
2844
2859
  const _654 = _653.id !== undefined ? _653.id : I[_653.type];
2845
2860
  switch (_654) {
2846
- case 76: {
2861
+ case 78: {
2847
2862
 
2848
2863
  let _655;
2849
2864
  L_656: {
2850
2865
  const _657 = c.idx;
2851
2866
  let _658;
2852
2867
  const _659 = c.tokens[c.idx];
2853
- if (_659 !== undefined && (_659.id === 76 || (_659.id === undefined && _659.type === "Minus"))) { c.idx++; _658 = _659; }
2868
+ if (_659 !== undefined && (_659.id === 78 || (_659.id === undefined && _659.type === "Minus"))) { c.idx++; _658 = _659; }
2854
2869
  else { if (c.track) { E(c, "Minus"); } _658 = F; }
2855
2870
  if (_658 === F) { c.idx = _657; _655 = F; break L_656; }
2856
2871
  _655 = "NEG";
2857
2872
  }
2858
2873
  _651 = _655; break L_652;
2859
2874
  }
2860
- case 75: {
2875
+ case 77: {
2861
2876
 
2862
2877
  let _660;
2863
2878
  L_661: {
2864
2879
  const _662 = c.idx;
2865
2880
  let _663;
2866
2881
  const _664 = c.tokens[c.idx];
2867
- if (_664 !== undefined && (_664.id === 75 || (_664.id === undefined && _664.type === "Plus"))) { c.idx++; _663 = _664; }
2882
+ if (_664 !== undefined && (_664.id === 77 || (_664.id === undefined && _664.type === "Plus"))) { c.idx++; _663 = _664; }
2868
2883
  else { if (c.track) { E(c, "Plus"); } _663 = F; }
2869
2884
  if (_663 === F) { c.idx = _662; _660 = F; break L_661; }
2870
2885
  _660 = "POS";
@@ -2937,7 +2952,7 @@ const _685 = c.tokens[c.idx];
2937
2952
  if (_685 === undefined) { if (c.track) { E(c, "LParen"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); } _683 = F; break L_684; }
2938
2953
  const _686 = _685.id !== undefined ? _685.id : I[_685.type];
2939
2954
  switch (_686) {
2940
- case 80: {
2955
+ case 82: {
2941
2956
 
2942
2957
  const _688 = c.ruleDepth;
2943
2958
  if (c.track) { c.ruleNames[_688] = "SubquerySource"; c.ruleDepth = _688 + 1; }
@@ -2945,7 +2960,7 @@ const _687 = R[37](c);
2945
2960
  if (c.track) c.ruleDepth = _688;
2946
2961
  _683 = _687; break L_684;
2947
2962
  }
2948
- case 60: case 58: case 59: {
2963
+ case 62: case 60: case 61: {
2949
2964
  let _689;
2950
2965
  L_690: {
2951
2966
  const _691 = c.idx;
@@ -2953,8 +2968,8 @@ let _692 = 3;
2953
2968
  if (!c.track) {
2954
2969
  const _693 = c.tokens[_691 + 1];
2955
2970
  switch (_693 === undefined ? -1 : (_693.id !== undefined ? _693.id : I[_693.type])) {
2956
- case 80: _692 = 3; break;
2957
- case 85: case 82: _692 = 2; break;
2971
+ case 82: _692 = 3; break;
2972
+ case 87: case 84: _692 = 2; break;
2958
2973
  default: _692 = 2; break;
2959
2974
  }
2960
2975
  }
@@ -3114,7 +3129,7 @@ L_751: {
3114
3129
  const _752 = c.idx;
3115
3130
  let _753;
3116
3131
  const _754 = c.tokens[c.idx];
3117
- if (_754 !== undefined && (_754.id === 80 || (_754.id === undefined && _754.type === "LParen"))) { c.idx++; _753 = _754; }
3132
+ if (_754 !== undefined && (_754.id === 82 || (_754.id === undefined && _754.type === "LParen"))) { c.idx++; _753 = _754; }
3118
3133
  else { if (c.track) { E(c, "LParen"); } _753 = F; }
3119
3134
  if (_753 === F) { c.idx = _752; _750 = F; break L_751; }
3120
3135
 
@@ -3132,7 +3147,7 @@ for (;;) {
3132
3147
  const _757 = c.idx;
3133
3148
  let _762;
3134
3149
  const _763 = c.tokens[c.idx];
3135
- if (_763 !== undefined && (_763.id === 84 || (_763.id === undefined && _763.type === "Comma"))) { c.idx++; _762 = _763; }
3150
+ if (_763 !== undefined && (_763.id === 86 || (_763.id === undefined && _763.type === "Comma"))) { c.idx++; _762 = _763; }
3136
3151
  else { if (c.track) { E(c, "Comma"); } _762 = F; }
3137
3152
  if (_762 === F) { c.idx = _757; break; }
3138
3153
  const _758 = c.idx;
@@ -3148,7 +3163,7 @@ _755.push(_764);
3148
3163
  if (_755 === F) { c.idx = _752; _750 = F; break L_751; }
3149
3164
  let _766;
3150
3165
  const _767 = c.tokens[c.idx];
3151
- if (_767 !== undefined && (_767.id === 81 || (_767.id === undefined && _767.type === "RParen"))) { c.idx++; _766 = _767; }
3166
+ if (_767 !== undefined && (_767.id === 83 || (_767.id === undefined && _767.type === "RParen"))) { c.idx++; _766 = _767; }
3152
3167
  else { if (c.track) { E(c, "RParen"); } _766 = F; }
3153
3168
  if (_766 === F) { c.idx = _752; _750 = F; break L_751; }
3154
3169
  _750 = _755;
@@ -3284,42 +3299,42 @@ const _804 = c.tokens[c.idx];
3284
3299
  if (_804 === undefined) { if (c.track) { E(c, "Star"); E(c, "Slash"); E(c, "Percent"); } _802 = F; break L_803; }
3285
3300
  const _805 = _804.id !== undefined ? _804.id : I[_804.type];
3286
3301
  switch (_805) {
3287
- case 77: {
3302
+ case 79: {
3288
3303
 
3289
3304
  let _806;
3290
3305
  L_807: {
3291
3306
  const _808 = c.idx;
3292
3307
  let _809;
3293
3308
  const _810 = c.tokens[c.idx];
3294
- if (_810 !== undefined && (_810.id === 77 || (_810.id === undefined && _810.type === "Star"))) { c.idx++; _809 = _810; }
3309
+ if (_810 !== undefined && (_810.id === 79 || (_810.id === undefined && _810.type === "Star"))) { c.idx++; _809 = _810; }
3295
3310
  else { if (c.track) { E(c, "Star"); } _809 = F; }
3296
3311
  if (_809 === F) { c.idx = _808; _806 = F; break L_807; }
3297
3312
  _806 = "MUL";
3298
3313
  }
3299
3314
  _802 = _806; break L_803;
3300
3315
  }
3301
- case 78: {
3316
+ case 80: {
3302
3317
 
3303
3318
  let _811;
3304
3319
  L_812: {
3305
3320
  const _813 = c.idx;
3306
3321
  let _814;
3307
3322
  const _815 = c.tokens[c.idx];
3308
- if (_815 !== undefined && (_815.id === 78 || (_815.id === undefined && _815.type === "Slash"))) { c.idx++; _814 = _815; }
3323
+ if (_815 !== undefined && (_815.id === 80 || (_815.id === undefined && _815.type === "Slash"))) { c.idx++; _814 = _815; }
3309
3324
  else { if (c.track) { E(c, "Slash"); } _814 = F; }
3310
3325
  if (_814 === F) { c.idx = _813; _811 = F; break L_812; }
3311
3326
  _811 = "DIV";
3312
3327
  }
3313
3328
  _802 = _811; break L_803;
3314
3329
  }
3315
- case 79: {
3330
+ case 81: {
3316
3331
 
3317
3332
  let _816;
3318
3333
  L_817: {
3319
3334
  const _818 = c.idx;
3320
3335
  let _819;
3321
3336
  const _820 = c.tokens[c.idx];
3322
- if (_820 !== undefined && (_820.id === 79 || (_820.id === undefined && _820.type === "Percent"))) { c.idx++; _819 = _820; }
3337
+ if (_820 !== undefined && (_820.id === 81 || (_820.id === undefined && _820.type === "Percent"))) { c.idx++; _819 = _820; }
3323
3338
  else { if (c.track) { E(c, "Percent"); } _819 = F; }
3324
3339
  if (_819 === F) { c.idx = _818; _816 = F; break L_817; }
3325
3340
  _816 = "MOD";
@@ -3367,7 +3382,7 @@ const _832 = c.tokens[c.idx];
3367
3382
  if (_832 === undefined) { if (c.track) { E(c, "DoubleColon"); E(c, "LongArrow"); E(c, "Arrow"); } _830 = F; break L_831; }
3368
3383
  const _833 = _832.id !== undefined ? _832.id : I[_832.type];
3369
3384
  switch (_833) {
3370
- case 64: {
3385
+ case 66: {
3371
3386
 
3372
3387
  let _834;
3373
3388
  L_836: {
@@ -3377,7 +3392,7 @@ const _837 = {};
3377
3392
  c.bindings = _837;
3378
3393
  let _839;
3379
3394
  const _840 = c.tokens[c.idx];
3380
- if (_840 !== undefined && (_840.id === 64 || (_840.id === undefined && _840.type === "DoubleColon"))) { c.idx++; _839 = _840; }
3395
+ if (_840 !== undefined && (_840.id === 66 || (_840.id === undefined && _840.type === "DoubleColon"))) { c.idx++; _839 = _840; }
3381
3396
  else { if (c.track) { E(c, "DoubleColon"); } _839 = F; }
3382
3397
  if (_839 === F) { c.idx = _835; c.bindings = _838; _834 = F; break L_836; }
3383
3398
 
@@ -3394,7 +3409,7 @@ _834 = _844;
3394
3409
  }
3395
3410
  _830 = _834; break L_831;
3396
3411
  }
3397
- case 62: {
3412
+ case 64: {
3398
3413
 
3399
3414
  let _845;
3400
3415
  L_847: {
@@ -3404,7 +3419,7 @@ const _848 = {};
3404
3419
  c.bindings = _848;
3405
3420
  let _850;
3406
3421
  const _851 = c.tokens[c.idx];
3407
- if (_851 !== undefined && (_851.id === 62 || (_851.id === undefined && _851.type === "LongArrow"))) { c.idx++; _850 = _851; }
3422
+ if (_851 !== undefined && (_851.id === 64 || (_851.id === undefined && _851.type === "LongArrow"))) { c.idx++; _850 = _851; }
3408
3423
  else { if (c.track) { E(c, "LongArrow"); } _850 = F; }
3409
3424
  if (_850 === F) { c.idx = _846; c.bindings = _849; _845 = F; break L_847; }
3410
3425
 
@@ -3421,7 +3436,7 @@ _845 = _855;
3421
3436
  }
3422
3437
  _830 = _845; break L_831;
3423
3438
  }
3424
- case 63: {
3439
+ case 65: {
3425
3440
 
3426
3441
  let _856;
3427
3442
  L_858: {
@@ -3431,7 +3446,7 @@ const _859 = {};
3431
3446
  c.bindings = _859;
3432
3447
  let _861;
3433
3448
  const _862 = c.tokens[c.idx];
3434
- if (_862 !== undefined && (_862.id === 63 || (_862.id === undefined && _862.type === "Arrow"))) { c.idx++; _861 = _862; }
3449
+ if (_862 !== undefined && (_862.id === 65 || (_862.id === undefined && _862.type === "Arrow"))) { c.idx++; _861 = _862; }
3435
3450
  else { if (c.track) { E(c, "Arrow"); } _861 = F; }
3436
3451
  if (_861 === F) { c.idx = _857; c.bindings = _860; _856 = F; break L_858; }
3437
3452
 
@@ -3469,7 +3484,7 @@ L_870: {
3469
3484
  const _871 = c.idx;
3470
3485
  let _872;
3471
3486
  const _873 = c.tokens[c.idx];
3472
- if (_873 !== undefined && (_873.id === 80 || (_873.id === undefined && _873.type === "LParen"))) { c.idx++; _872 = _873; }
3487
+ if (_873 !== undefined && (_873.id === 82 || (_873.id === undefined && _873.type === "LParen"))) { c.idx++; _872 = _873; }
3473
3488
  else { if (c.track) { E(c, "LParen"); } _872 = F; }
3474
3489
  if (_872 === F) { c.idx = _871; _869 = F; break L_870; }
3475
3490
 
@@ -3480,7 +3495,7 @@ if (c.track) c.ruleDepth = _875;
3480
3495
  if (_874 === F) { c.idx = _871; _869 = F; break L_870; }
3481
3496
  let _876;
3482
3497
  const _877 = c.tokens[c.idx];
3483
- if (_877 !== undefined && (_877.id === 81 || (_877.id === undefined && _877.type === "RParen"))) { c.idx++; _876 = _877; }
3498
+ if (_877 !== undefined && (_877.id === 83 || (_877.id === undefined && _877.type === "RParen"))) { c.idx++; _876 = _877; }
3484
3499
  else { if (c.track) { E(c, "RParen"); } _876 = F; }
3485
3500
  if (_876 === F) { c.idx = _871; _869 = F; break L_870; }
3486
3501
  _869 = _874;
@@ -3508,7 +3523,7 @@ const _883 = _884;
3508
3523
  if (_883 === F) { c.idx = _879; c.bindings = _882; _878 = F; break L_880; }
3509
3524
  let _886;
3510
3525
  const _887 = c.tokens[c.idx];
3511
- if (_887 !== undefined && (_887.id === 80 || (_887.id === undefined && _887.type === "LParen"))) { c.idx++; _886 = _887; }
3526
+ if (_887 !== undefined && (_887.id === 82 || (_887.id === undefined && _887.type === "LParen"))) { c.idx++; _886 = _887; }
3512
3527
  else { if (c.track) { E(c, "LParen"); } _886 = F; }
3513
3528
  if (_886 === F) { c.idx = _879; c.bindings = _882; _878 = F; break L_880; }
3514
3529
 
@@ -3526,7 +3541,7 @@ for (;;) {
3526
3541
  const _891 = c.idx;
3527
3542
  let _896;
3528
3543
  const _897 = c.tokens[c.idx];
3529
- if (_897 !== undefined && (_897.id === 84 || (_897.id === undefined && _897.type === "Comma"))) { c.idx++; _896 = _897; }
3544
+ if (_897 !== undefined && (_897.id === 86 || (_897.id === undefined && _897.type === "Comma"))) { c.idx++; _896 = _897; }
3530
3545
  else { if (c.track) { E(c, "Comma"); } _896 = F; }
3531
3546
  if (_896 === F) { c.idx = _891; break; }
3532
3547
  const _892 = c.idx;
@@ -3544,7 +3559,7 @@ const _888 = _889;
3544
3559
  if (_888 === F) { c.idx = _879; c.bindings = _882; _878 = F; break L_880; }
3545
3560
  let _900;
3546
3561
  const _901 = c.tokens[c.idx];
3547
- if (_901 !== undefined && (_901.id === 81 || (_901.id === undefined && _901.type === "RParen"))) { c.idx++; _900 = _901; }
3562
+ if (_901 !== undefined && (_901.id === 83 || (_901.id === undefined && _901.type === "RParen"))) { c.idx++; _900 = _901; }
3548
3563
  else { if (c.track) { E(c, "RParen"); } _900 = F; }
3549
3564
  if (_900 === F) { c.idx = _879; c.bindings = _882; _878 = F; break L_880; }
3550
3565
  const _902 = H[40](_881, c);
@@ -3742,10 +3757,10 @@ R[43] = (c) => {
3742
3757
  let _967;
3743
3758
  L_968: {
3744
3759
  const _969 = c.tokens[c.idx];
3745
- if (_969 === undefined) { if (c.track) { E(c, "LParen"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _967 = F; break L_968; }
3760
+ if (_969 === undefined) { if (c.track) { E(c, "LParen"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Pivot"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _967 = F; break L_968; }
3746
3761
  const _970 = _969.id !== undefined ? _969.id : I[_969.type];
3747
3762
  switch (_970) {
3748
- case 80: {
3763
+ case 82: {
3749
3764
 
3750
3765
  const _972 = c.ruleDepth;
3751
3766
  if (c.track) { c.ruleNames[_972] = "ParenExpr"; c.ruleDepth = _972 + 1; }
@@ -3785,116 +3800,124 @@ const _979 = R[51](c);
3785
3800
  if (c.track) c.ruleDepth = _980;
3786
3801
  _967 = _979; break L_968;
3787
3802
  }
3788
- case 60: case 58: case 59: {
3789
- let _981;
3790
- L_982: {
3791
- const _983 = c.idx;
3792
- let _984 = 3;
3803
+ case 57: {
3804
+
3805
+ const _982 = c.ruleDepth;
3806
+ if (c.track) { c.ruleNames[_982] = "PivotExpr"; c.ruleDepth = _982 + 1; }
3807
+ const _981 = R[52](c);
3808
+ if (c.track) c.ruleDepth = _982;
3809
+ _967 = _981; break L_968;
3810
+ }
3811
+ case 62: case 60: case 61: {
3812
+ let _983;
3813
+ L_984: {
3814
+ const _985 = c.idx;
3815
+ let _986 = 3;
3793
3816
  if (!c.track) {
3794
- const _985 = c.tokens[_983 + 1];
3795
- switch (_985 === undefined ? -1 : (_985.id !== undefined ? _985.id : I[_985.type])) {
3796
- case 80: _984 = 3; break;
3797
- case 85: case 82: _984 = 2; break;
3798
- default: _984 = 2; break;
3817
+ const _987 = c.tokens[_985 + 1];
3818
+ switch (_987 === undefined ? -1 : (_987.id !== undefined ? _987.id : I[_987.type])) {
3819
+ case 82: _986 = 3; break;
3820
+ case 87: case 84: _986 = 2; break;
3821
+ default: _986 = 2; break;
3799
3822
  }
3800
3823
  }
3801
- if (_984 & 1) {
3802
-
3803
- const _987 = c.ruleDepth;
3804
- if (c.track) { c.ruleNames[_987] = "FunctionCall"; c.ruleDepth = _987 + 1; }
3805
- const _986 = R[52](c);
3806
- if (c.track) c.ruleDepth = _987;
3807
- if (_986 !== F) { _981 = _986; break L_982; }
3808
- c.idx = _983;
3809
- }
3810
- if (_984 & 2) {
3824
+ if (_986 & 1) {
3811
3825
 
3812
3826
  const _989 = c.ruleDepth;
3813
- if (c.track) { c.ruleNames[_989] = "ColumnRef"; c.ruleDepth = _989 + 1; }
3827
+ if (c.track) { c.ruleNames[_989] = "FunctionCall"; c.ruleDepth = _989 + 1; }
3814
3828
  const _988 = R[53](c);
3815
3829
  if (c.track) c.ruleDepth = _989;
3816
- if (_988 !== F) { _981 = _988; break L_982; }
3817
- c.idx = _983;
3818
- }
3819
- _981 = F;
3820
- }
3821
- _967 = _981; break L_968;
3830
+ if (_988 !== F) { _983 = _988; break L_984; }
3831
+ c.idx = _985;
3822
3832
  }
3823
- case 19: case 20: {
3833
+ if (_986 & 2) {
3824
3834
 
3825
3835
  const _991 = c.ruleDepth;
3826
- if (c.track) { c.ruleNames[_991] = "FunctionCall"; c.ruleDepth = _991 + 1; }
3827
- const _990 = R[52](c);
3836
+ if (c.track) { c.ruleNames[_991] = "ColumnRef"; c.ruleDepth = _991 + 1; }
3837
+ const _990 = R[54](c);
3828
3838
  if (c.track) c.ruleDepth = _991;
3829
- _967 = _990; break L_968;
3839
+ if (_990 !== F) { _983 = _990; break L_984; }
3840
+ c.idx = _985;
3841
+ }
3842
+ _983 = F;
3843
+ }
3844
+ _967 = _983; break L_968;
3830
3845
  }
3831
- case 56: {
3846
+ case 19: case 20: {
3832
3847
 
3833
3848
  const _993 = c.ruleDepth;
3834
- if (c.track) { c.ruleNames[_993] = "NumberLiteral"; c.ruleDepth = _993 + 1; }
3835
- const _992 = R[22](c);
3849
+ if (c.track) { c.ruleNames[_993] = "FunctionCall"; c.ruleDepth = _993 + 1; }
3850
+ const _992 = R[53](c);
3836
3851
  if (c.track) c.ruleDepth = _993;
3837
3852
  _967 = _992; break L_968;
3838
3853
  }
3839
- case 57: {
3854
+ case 58: {
3840
3855
 
3841
3856
  const _995 = c.ruleDepth;
3842
- if (c.track) { c.ruleNames[_995] = "StringLiteral"; c.ruleDepth = _995 + 1; }
3843
- const _994 = R[23](c);
3857
+ if (c.track) { c.ruleNames[_995] = "NumberLiteral"; c.ruleDepth = _995 + 1; }
3858
+ const _994 = R[22](c);
3844
3859
  if (c.track) c.ruleDepth = _995;
3845
3860
  _967 = _994; break L_968;
3846
3861
  }
3862
+ case 59: {
3863
+
3864
+ const _997 = c.ruleDepth;
3865
+ if (c.track) { c.ruleNames[_997] = "StringLiteral"; c.ruleDepth = _997 + 1; }
3866
+ const _996 = R[23](c);
3867
+ if (c.track) c.ruleDepth = _997;
3868
+ _967 = _996; break L_968;
3869
+ }
3847
3870
  case 39: {
3848
3871
 
3849
- let _996;
3850
- L_997: {
3851
- const _998 = c.idx;
3852
- let _999;
3853
- const _1000 = c.tokens[c.idx];
3854
- if (_1000 !== undefined && (_1000.id === 39 || (_1000.id === undefined && _1000.type === "True"))) { c.idx++; _999 = _1000; }
3855
- else { if (c.track) { E(c, "True"); } _999 = F; }
3856
- if (_999 === F) { c.idx = _998; _996 = F; break L_997; }
3857
- _996 = true;
3872
+ let _998;
3873
+ L_999: {
3874
+ const _1000 = c.idx;
3875
+ let _1001;
3876
+ const _1002 = c.tokens[c.idx];
3877
+ if (_1002 !== undefined && (_1002.id === 39 || (_1002.id === undefined && _1002.type === "True"))) { c.idx++; _1001 = _1002; }
3878
+ else { if (c.track) { E(c, "True"); } _1001 = F; }
3879
+ if (_1001 === F) { c.idx = _1000; _998 = F; break L_999; }
3880
+ _998 = true;
3858
3881
  }
3859
- _967 = _996; break L_968;
3882
+ _967 = _998; break L_968;
3860
3883
  }
3861
3884
  case 40: {
3862
3885
 
3863
- let _1001;
3864
- L_1002: {
3865
- const _1003 = c.idx;
3866
- let _1004;
3867
- const _1005 = c.tokens[c.idx];
3868
- if (_1005 !== undefined && (_1005.id === 40 || (_1005.id === undefined && _1005.type === "False"))) { c.idx++; _1004 = _1005; }
3869
- else { if (c.track) { E(c, "False"); } _1004 = F; }
3870
- if (_1004 === F) { c.idx = _1003; _1001 = F; break L_1002; }
3871
- _1001 = false;
3886
+ let _1003;
3887
+ L_1004: {
3888
+ const _1005 = c.idx;
3889
+ let _1006;
3890
+ const _1007 = c.tokens[c.idx];
3891
+ if (_1007 !== undefined && (_1007.id === 40 || (_1007.id === undefined && _1007.type === "False"))) { c.idx++; _1006 = _1007; }
3892
+ else { if (c.track) { E(c, "False"); } _1006 = F; }
3893
+ if (_1006 === F) { c.idx = _1005; _1003 = F; break L_1004; }
3894
+ _1003 = false;
3872
3895
  }
3873
- _967 = _1001; break L_968;
3896
+ _967 = _1003; break L_968;
3874
3897
  }
3875
3898
  case 14: {
3876
3899
 
3877
- let _1006;
3878
- L_1007: {
3879
- const _1008 = c.idx;
3880
- let _1009;
3881
- const _1010 = c.tokens[c.idx];
3882
- if (_1010 !== undefined && (_1010.id === 14 || (_1010.id === undefined && _1010.type === "Null"))) { c.idx++; _1009 = _1010; }
3883
- else { if (c.track) { E(c, "Null"); } _1009 = F; }
3884
- if (_1009 === F) { c.idx = _1008; _1006 = F; break L_1007; }
3885
- _1006 = null;
3900
+ let _1008;
3901
+ L_1009: {
3902
+ const _1010 = c.idx;
3903
+ let _1011;
3904
+ const _1012 = c.tokens[c.idx];
3905
+ if (_1012 !== undefined && (_1012.id === 14 || (_1012.id === undefined && _1012.type === "Null"))) { c.idx++; _1011 = _1012; }
3906
+ else { if (c.track) { E(c, "Null"); } _1011 = F; }
3907
+ if (_1011 === F) { c.idx = _1010; _1008 = F; break L_1009; }
3908
+ _1008 = null;
3886
3909
  }
3887
- _967 = _1006; break L_968;
3910
+ _967 = _1008; break L_968;
3888
3911
  }
3889
- case 87: case 61: case 65: {
3912
+ case 89: case 63: case 67: {
3890
3913
 
3891
- const _1012 = c.ruleDepth;
3892
- if (c.track) { c.ruleNames[_1012] = "Param"; c.ruleDepth = _1012 + 1; }
3893
- const _1011 = R[54](c);
3894
- if (c.track) c.ruleDepth = _1012;
3895
- _967 = _1011; break L_968;
3914
+ const _1014 = c.ruleDepth;
3915
+ if (c.track) { c.ruleNames[_1014] = "Param"; c.ruleDepth = _1014 + 1; }
3916
+ const _1013 = R[55](c);
3917
+ if (c.track) c.ruleDepth = _1014;
3918
+ _967 = _1013; break L_968;
3896
3919
  }
3897
- default: { if (c.track) { E(c, "LParen"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _967 = F; break L_968; }
3920
+ default: { if (c.track) { E(c, "LParen"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Pivot"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _967 = F; break L_968; }
3898
3921
  }
3899
3922
  }
3900
3923
  return _967;
@@ -3903,1482 +3926,1580 @@ return _967;
3903
3926
  // TypeName
3904
3927
  R[44] = (c) => {
3905
3928
 
3906
- let _1014;
3907
- L_1015: {
3908
- const _1016 = c.idx;
3909
-
3910
- const _1018 = c.ruleDepth;
3911
- if (c.track) { c.ruleNames[_1018] = "Ident"; c.ruleDepth = _1018 + 1; }
3912
- const _1017 = R[15](c);
3913
- if (c.track) c.ruleDepth = _1018;
3914
- if (_1017 === F) { c.idx = _1016; _1014 = F; break L_1015; }
3915
- let _1019;
3916
- const _1020 = c.idx;
3917
- {
3929
+ let _1016;
3930
+ L_1017: {
3931
+ const _1018 = c.idx;
3918
3932
 
3933
+ const _1020 = c.ruleDepth;
3934
+ if (c.track) { c.ruleNames[_1020] = "Ident"; c.ruleDepth = _1020 + 1; }
3935
+ const _1019 = R[15](c);
3936
+ if (c.track) c.ruleDepth = _1020;
3937
+ if (_1019 === F) { c.idx = _1018; _1016 = F; break L_1017; }
3919
3938
  let _1021;
3920
- L_1022: {
3921
- const _1023 = c.idx;
3922
- let _1024;
3923
- const _1025 = c.tokens[c.idx];
3924
- if (_1025 !== undefined && (_1025.id === 80 || (_1025.id === undefined && _1025.type === "LParen"))) { c.idx++; _1024 = _1025; }
3925
- else { if (c.track) { E(c, "LParen"); } _1024 = F; }
3926
- if (_1024 === F) { c.idx = _1023; _1021 = F; break L_1022; }
3927
-
3928
- let _1026 = [];
3929
- L_1030: {
3930
- const _1027 = c.idx;
3931
- let _1031;
3932
- const _1032 = c.tokens[c.idx];
3933
- if (_1032 !== undefined && (_1032.id === 56 || (_1032.id === undefined && _1032.type === "Number"))) { c.idx++; _1031 = _1032; }
3934
- else { if (c.track) { E(c, "Number"); } _1031 = F; }
3935
- if (_1031 === F) { c.idx = _1027; _1026 = F; break L_1030; }
3936
- _1026.push(_1031);
3937
- for (;;) {
3938
- const _1028 = c.idx;
3939
+ const _1022 = c.idx;
3940
+ {
3941
+
3942
+ let _1023;
3943
+ L_1024: {
3944
+ const _1025 = c.idx;
3945
+ let _1026;
3946
+ const _1027 = c.tokens[c.idx];
3947
+ if (_1027 !== undefined && (_1027.id === 82 || (_1027.id === undefined && _1027.type === "LParen"))) { c.idx++; _1026 = _1027; }
3948
+ else { if (c.track) { E(c, "LParen"); } _1026 = F; }
3949
+ if (_1026 === F) { c.idx = _1025; _1023 = F; break L_1024; }
3950
+
3951
+ let _1028 = [];
3952
+ L_1032: {
3953
+ const _1029 = c.idx;
3939
3954
  let _1033;
3940
3955
  const _1034 = c.tokens[c.idx];
3941
- if (_1034 !== undefined && (_1034.id === 84 || (_1034.id === undefined && _1034.type === "Comma"))) { c.idx++; _1033 = _1034; }
3942
- else { if (c.track) { E(c, "Comma"); } _1033 = F; }
3943
- if (_1033 === F) { c.idx = _1028; break; }
3944
- const _1029 = c.idx;
3956
+ if (_1034 !== undefined && (_1034.id === 58 || (_1034.id === undefined && _1034.type === "Number"))) { c.idx++; _1033 = _1034; }
3957
+ else { if (c.track) { E(c, "Number"); } _1033 = F; }
3958
+ if (_1033 === F) { c.idx = _1029; _1028 = F; break L_1032; }
3959
+ _1028.push(_1033);
3960
+ for (;;) {
3961
+ const _1030 = c.idx;
3945
3962
  let _1035;
3946
3963
  const _1036 = c.tokens[c.idx];
3947
- if (_1036 !== undefined && (_1036.id === 56 || (_1036.id === undefined && _1036.type === "Number"))) { c.idx++; _1035 = _1036; }
3948
- else { if (c.track) { E(c, "Number"); } _1035 = F; }
3949
- if (_1035 === F) { c.idx = _1028; break; }
3950
- _1026.push(_1035);
3951
- }
3952
- }
3953
- if (_1026 === F) { c.idx = _1023; _1021 = F; break L_1022; }
3964
+ if (_1036 !== undefined && (_1036.id === 86 || (_1036.id === undefined && _1036.type === "Comma"))) { c.idx++; _1035 = _1036; }
3965
+ else { if (c.track) { E(c, "Comma"); } _1035 = F; }
3966
+ if (_1035 === F) { c.idx = _1030; break; }
3967
+ const _1031 = c.idx;
3954
3968
  let _1037;
3955
3969
  const _1038 = c.tokens[c.idx];
3956
- if (_1038 !== undefined && (_1038.id === 81 || (_1038.id === undefined && _1038.type === "RParen"))) { c.idx++; _1037 = _1038; }
3957
- else { if (c.track) { E(c, "RParen"); } _1037 = F; }
3958
- if (_1037 === F) { c.idx = _1023; _1021 = F; break L_1022; }
3959
- _1021 = _1026;
3970
+ if (_1038 !== undefined && (_1038.id === 58 || (_1038.id === undefined && _1038.type === "Number"))) { c.idx++; _1037 = _1038; }
3971
+ else { if (c.track) { E(c, "Number"); } _1037 = F; }
3972
+ if (_1037 === F) { c.idx = _1030; break; }
3973
+ _1028.push(_1037);
3974
+ }
3975
+ }
3976
+ if (_1028 === F) { c.idx = _1025; _1023 = F; break L_1024; }
3977
+ let _1039;
3978
+ const _1040 = c.tokens[c.idx];
3979
+ if (_1040 !== undefined && (_1040.id === 83 || (_1040.id === undefined && _1040.type === "RParen"))) { c.idx++; _1039 = _1040; }
3980
+ else { if (c.track) { E(c, "RParen"); } _1039 = F; }
3981
+ if (_1039 === F) { c.idx = _1025; _1023 = F; break L_1024; }
3982
+ _1023 = _1028;
3960
3983
  }
3961
- if (_1021 === F) { c.idx = _1020; _1019 = null; } else _1019 = _1021;
3984
+ if (_1023 === F) { c.idx = _1022; _1021 = null; } else _1021 = _1023;
3962
3985
  }
3963
- if (_1019 === F) { c.idx = _1016; _1014 = F; break L_1015; }
3964
- _1014 = _1017;
3986
+ if (_1021 === F) { c.idx = _1018; _1016 = F; break L_1017; }
3987
+ _1016 = _1019;
3965
3988
  }
3966
- return _1014;
3989
+ return _1016;
3967
3990
  }
3968
3991
 
3969
3992
  // AndExpr$tower
3970
3993
  R[45] = (c) => {
3971
3994
 
3972
- let _1039;
3973
- L_1040: {
3974
-
3975
- const _1045 = c.ruleDepth;
3976
- if (c.track) { c.ruleNames[_1045] = "NotExpr"; c.ruleDepth = _1045 + 1; }
3977
- const _1044 = R[42](c);
3978
- if (c.track) c.ruleDepth = _1045;
3979
- if (_1044 === F) { _1039 = F; break L_1040; }
3980
- let _1041 = _1044;
3981
- let _1042 = null;
3995
+ let _1041;
3996
+ L_1042: {
3997
+
3998
+ const _1047 = c.ruleDepth;
3999
+ if (c.track) { c.ruleNames[_1047] = "NotExpr"; c.ruleDepth = _1047 + 1; }
4000
+ const _1046 = R[42](c);
4001
+ if (c.track) c.ruleDepth = _1047;
4002
+ if (_1046 === F) { _1041 = F; break L_1042; }
4003
+ let _1043 = _1046;
4004
+ let _1044 = null;
3982
4005
  for (;;) {
3983
- const _1043 = c.idx;
3984
- let _1046;
3985
- const _1047 = c.tokens[c.idx];
3986
- if (_1047 !== undefined && (_1047.id === 9 || (_1047.id === undefined && _1047.type === "And"))) { c.idx++; _1046 = _1047; }
3987
- else { if (c.track) { E(c, "And"); } _1046 = F; }
3988
- if (_1046 === F) { c.idx = _1043; break; }
4006
+ const _1045 = c.idx;
4007
+ let _1048;
4008
+ const _1049 = c.tokens[c.idx];
4009
+ if (_1049 !== undefined && (_1049.id === 9 || (_1049.id === undefined && _1049.type === "And"))) { c.idx++; _1048 = _1049; }
4010
+ else { if (c.track) { E(c, "And"); } _1048 = F; }
4011
+ if (_1048 === F) { c.idx = _1045; break; }
3989
4012
 
3990
- const _1049 = c.ruleDepth;
3991
- if (c.track) { c.ruleNames[_1049] = "NotExpr"; c.ruleDepth = _1049 + 1; }
3992
- const _1048 = R[42](c);
3993
- if (c.track) c.ruleDepth = _1049;
3994
- if (_1048 === F) { c.idx = _1043; break; }
3995
- if (_1042 === null) _1042 = { left: null, op: null, right: null };
3996
- _1042.left = _1041; _1042.op = _1046; _1042.right = _1048;
3997
- _1041 = H[43](_1042, c);
4013
+ const _1051 = c.ruleDepth;
4014
+ if (c.track) { c.ruleNames[_1051] = "NotExpr"; c.ruleDepth = _1051 + 1; }
4015
+ const _1050 = R[42](c);
4016
+ if (c.track) c.ruleDepth = _1051;
4017
+ if (_1050 === F) { c.idx = _1045; break; }
4018
+ if (_1044 === null) _1044 = { left: null, op: null, right: null };
4019
+ _1044.left = _1043; _1044.op = _1048; _1044.right = _1050;
4020
+ _1043 = H[43](_1044, c);
3998
4021
  }
3999
- _1039 = _1041;
4022
+ _1041 = _1043;
4000
4023
  }
4001
- return _1039;
4024
+ return _1041;
4002
4025
  }
4003
4026
 
4004
4027
  // Predicate
4005
4028
  R[46] = (c) => {
4006
4029
 
4007
- let _1050;
4008
- L_1051: {
4009
-
4010
- const _1056 = c.ruleDepth;
4011
- if (c.track) { c.ruleNames[_1056] = "ConcatExpr"; c.ruleDepth = _1056 + 1; }
4012
- const _1055 = R[55](c);
4013
- if (c.track) c.ruleDepth = _1056;
4014
- if (_1055 === F) { _1050 = F; break L_1051; }
4015
- let _1052 = _1055;
4016
- let _1053 = null;
4017
- for (;;) {
4018
- const _1054 = c.idx;
4030
+ let _1052;
4031
+ L_1053: {
4019
4032
 
4020
4033
  const _1058 = c.ruleDepth;
4021
- if (c.track) { c.ruleNames[_1058] = "PredicateTail"; c.ruleDepth = _1058 + 1; }
4034
+ if (c.track) { c.ruleNames[_1058] = "ConcatExpr"; c.ruleDepth = _1058 + 1; }
4022
4035
  const _1057 = R[56](c);
4023
4036
  if (c.track) c.ruleDepth = _1058;
4024
- if (_1057 === F) { c.idx = _1054; break; }
4025
- if (_1053 === null) _1053 = { left: null, suffix: null };
4026
- _1053.left = _1052; _1053.suffix = _1057;
4027
- _1052 = H[44](_1053, c);
4037
+ if (_1057 === F) { _1052 = F; break L_1053; }
4038
+ let _1054 = _1057;
4039
+ let _1055 = null;
4040
+ for (;;) {
4041
+ const _1056 = c.idx;
4042
+
4043
+ const _1060 = c.ruleDepth;
4044
+ if (c.track) { c.ruleNames[_1060] = "PredicateTail"; c.ruleDepth = _1060 + 1; }
4045
+ const _1059 = R[57](c);
4046
+ if (c.track) c.ruleDepth = _1060;
4047
+ if (_1059 === F) { c.idx = _1056; break; }
4048
+ if (_1055 === null) _1055 = { left: null, suffix: null };
4049
+ _1055.left = _1054; _1055.suffix = _1059;
4050
+ _1054 = H[44](_1055, c);
4028
4051
  }
4029
- _1050 = _1052;
4052
+ _1052 = _1054;
4030
4053
  }
4031
- return _1050;
4054
+ return _1052;
4032
4055
  }
4033
4056
 
4034
4057
  // ParenExpr
4035
4058
  R[47] = (c) => {
4036
4059
 
4037
- let _1059;
4038
- L_1060: {
4039
- const _1061 = c.idx;
4040
- let _1062;
4041
- const _1063 = c.tokens[c.idx];
4042
- if (_1063 !== undefined && (_1063.id === 80 || (_1063.id === undefined && _1063.type === "LParen"))) { c.idx++; _1062 = _1063; }
4043
- else { if (c.track) { E(c, "LParen"); } _1062 = F; }
4044
- if (_1062 === F) { c.idx = _1061; _1059 = F; break L_1060; }
4045
-
4060
+ let _1061;
4061
+ L_1062: {
4062
+ const _1063 = c.idx;
4046
4063
  let _1064;
4047
- L_1065: {
4048
- const _1066 = c.tokens[c.idx];
4049
- if (_1066 === undefined) { if (c.track) { E(c, "With"); E(c, "LParen"); E(c, "Select"); E(c, "Values"); E(c, "Not"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _1064 = F; break L_1065; }
4050
- const _1067 = _1066.id !== undefined ? _1066.id : I[_1066.type];
4051
- switch (_1067) {
4064
+ const _1065 = c.tokens[c.idx];
4065
+ if (_1065 !== undefined && (_1065.id === 82 || (_1065.id === undefined && _1065.type === "LParen"))) { c.idx++; _1064 = _1065; }
4066
+ else { if (c.track) { E(c, "LParen"); } _1064 = F; }
4067
+ if (_1064 === F) { c.idx = _1063; _1061 = F; break L_1062; }
4068
+
4069
+ let _1066;
4070
+ L_1067: {
4071
+ const _1068 = c.tokens[c.idx];
4072
+ if (_1068 === undefined) { if (c.track) { E(c, "With"); E(c, "LParen"); E(c, "Select"); E(c, "Values"); E(c, "Not"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Pivot"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _1066 = F; break L_1067; }
4073
+ const _1069 = _1068.id !== undefined ? _1068.id : I[_1068.type];
4074
+ switch (_1069) {
4052
4075
  case 46: case 3: case 38: {
4053
4076
 
4054
- const _1071 = c.ruleDepth;
4055
- if (c.track) { c.ruleNames[_1071] = "Query"; c.ruleDepth = _1071 + 1; }
4056
- const _1070 = R[2](c);
4057
- if (c.track) c.ruleDepth = _1071;
4058
- const _1069 = _1070 === F ? F : H[45](_1070, c);
4059
- _1064 = _1069; break L_1065;
4077
+ const _1073 = c.ruleDepth;
4078
+ if (c.track) { c.ruleNames[_1073] = "Query"; c.ruleDepth = _1073 + 1; }
4079
+ const _1072 = R[2](c);
4080
+ if (c.track) c.ruleDepth = _1073;
4081
+ const _1071 = _1072 === F ? F : H[45](_1072, c);
4082
+ _1066 = _1071; break L_1067;
4060
4083
  }
4061
- case 80: {
4062
- let _1072;
4063
- L_1073: {
4064
- const _1074 = c.idx;
4065
- let _1075 = 3;
4084
+ case 82: {
4085
+ let _1074;
4086
+ L_1075: {
4087
+ const _1076 = c.idx;
4088
+ let _1077 = 3;
4066
4089
  if (!c.track) {
4067
- const _1076 = c.tokens[_1074 + 1];
4068
- switch (_1076 === undefined ? -1 : (_1076.id !== undefined ? _1076.id : I[_1076.type])) {
4069
- case 46: case 3: case 80: case 38: _1075 = 3; break;
4070
- case 11: case 76: case 75: case 39: case 40: case 14: case 51: case 52: case 60: case 58: case 59: case 19: case 20: case 56: case 57: case 87: case 61: case 65: case 50: case 41: _1075 = 2; break;
4071
- default: _1075 = 0; break;
4090
+ const _1078 = c.tokens[_1076 + 1];
4091
+ switch (_1078 === undefined ? -1 : (_1078.id !== undefined ? _1078.id : I[_1078.type])) {
4092
+ case 46: case 3: case 82: case 38: _1077 = 3; break;
4093
+ case 11: case 78: case 77: case 39: case 40: case 14: case 51: case 52: case 57: case 62: case 60: case 61: case 19: case 20: case 58: case 59: case 89: case 63: case 67: case 50: case 41: _1077 = 2; break;
4094
+ default: _1077 = 0; break;
4072
4095
  }
4073
4096
  }
4074
- if (_1075 & 1) {
4075
-
4076
- const _1080 = c.ruleDepth;
4077
- if (c.track) { c.ruleNames[_1080] = "Query"; c.ruleDepth = _1080 + 1; }
4078
- const _1079 = R[2](c);
4079
- if (c.track) c.ruleDepth = _1080;
4080
- const _1078 = _1079 === F ? F : H[46](_1079, c);
4081
- if (_1078 !== F) { _1072 = _1078; break L_1073; }
4082
- c.idx = _1074;
4083
- }
4084
- if (_1075 & 2) {
4097
+ if (_1077 & 1) {
4085
4098
 
4086
4099
  const _1082 = c.ruleDepth;
4087
- if (c.track) { c.ruleNames[_1082] = "Expression"; c.ruleDepth = _1082 + 1; }
4088
- const _1081 = R[19](c);
4100
+ if (c.track) { c.ruleNames[_1082] = "Query"; c.ruleDepth = _1082 + 1; }
4101
+ const _1081 = R[2](c);
4089
4102
  if (c.track) c.ruleDepth = _1082;
4090
- if (_1081 !== F) { _1072 = _1081; break L_1073; }
4091
- c.idx = _1074;
4092
- }
4093
- _1072 = F;
4103
+ const _1080 = _1081 === F ? F : H[46](_1081, c);
4104
+ if (_1080 !== F) { _1074 = _1080; break L_1075; }
4105
+ c.idx = _1076;
4094
4106
  }
4095
- _1064 = _1072; break L_1065;
4096
- }
4097
- case 11: case 76: case 75: case 39: case 40: case 14: case 50: case 41: case 51: case 52: case 60: case 58: case 59: case 19: case 20: case 56: case 57: case 87: case 61: case 65: {
4107
+ if (_1077 & 2) {
4098
4108
 
4099
4109
  const _1084 = c.ruleDepth;
4100
4110
  if (c.track) { c.ruleNames[_1084] = "Expression"; c.ruleDepth = _1084 + 1; }
4101
4111
  const _1083 = R[19](c);
4102
4112
  if (c.track) c.ruleDepth = _1084;
4103
- _1064 = _1083; break L_1065;
4113
+ if (_1083 !== F) { _1074 = _1083; break L_1075; }
4114
+ c.idx = _1076;
4104
4115
  }
4105
- default: { if (c.track) { E(c, "With"); E(c, "LParen"); E(c, "Select"); E(c, "Values"); E(c, "Not"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _1064 = F; break L_1065; }
4116
+ _1074 = F;
4106
4117
  }
4118
+ _1066 = _1074; break L_1067;
4107
4119
  }
4108
- if (_1064 === F) { c.idx = _1061; _1059 = F; break L_1060; }
4109
- let _1085;
4110
- const _1086 = c.tokens[c.idx];
4111
- if (_1086 !== undefined && (_1086.id === 81 || (_1086.id === undefined && _1086.type === "RParen"))) { c.idx++; _1085 = _1086; }
4112
- else { if (c.track) { E(c, "RParen"); } _1085 = F; }
4113
- if (_1085 === F) { c.idx = _1061; _1059 = F; break L_1060; }
4114
- _1059 = _1064;
4120
+ case 11: case 78: case 77: case 39: case 40: case 14: case 50: case 41: case 51: case 52: case 57: case 62: case 60: case 61: case 19: case 20: case 58: case 59: case 89: case 63: case 67: {
4121
+
4122
+ const _1086 = c.ruleDepth;
4123
+ if (c.track) { c.ruleNames[_1086] = "Expression"; c.ruleDepth = _1086 + 1; }
4124
+ const _1085 = R[19](c);
4125
+ if (c.track) c.ruleDepth = _1086;
4126
+ _1066 = _1085; break L_1067;
4127
+ }
4128
+ default: { if (c.track) { E(c, "With"); E(c, "LParen"); E(c, "Select"); E(c, "Values"); E(c, "Not"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Pivot"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _1066 = F; break L_1067; }
4129
+ }
4130
+ }
4131
+ if (_1066 === F) { c.idx = _1063; _1061 = F; break L_1062; }
4132
+ let _1087;
4133
+ const _1088 = c.tokens[c.idx];
4134
+ if (_1088 !== undefined && (_1088.id === 83 || (_1088.id === undefined && _1088.type === "RParen"))) { c.idx++; _1087 = _1088; }
4135
+ else { if (c.track) { E(c, "RParen"); } _1087 = F; }
4136
+ if (_1087 === F) { c.idx = _1063; _1061 = F; break L_1062; }
4137
+ _1061 = _1066;
4115
4138
  }
4116
- return _1059;
4139
+ return _1061;
4117
4140
  }
4118
4141
 
4119
4142
  // ExistsExpr
4120
4143
  R[48] = (c) => {
4121
4144
 
4122
- let _1087;
4123
- L_1089: {
4124
- const _1088 = c.idx;
4125
- const _1091 = c.bindings;
4126
- const _1090 = {};
4127
- c.bindings = _1090;
4128
- let _1092;
4129
- const _1093 = c.tokens[c.idx];
4130
- if (_1093 !== undefined && (_1093.id === 50 || (_1093.id === undefined && _1093.type === "Exists"))) { c.idx++; _1092 = _1093; }
4131
- else { if (c.track) { E(c, "Exists"); } _1092 = F; }
4132
- if (_1092 === F) { c.idx = _1088; c.bindings = _1091; _1087 = F; break L_1089; }
4133
-
4134
- let _1095;
4135
- L_1096: {
4136
- const _1097 = c.idx;
4137
- let _1098;
4138
- const _1099 = c.tokens[c.idx];
4139
- if (_1099 !== undefined && (_1099.id === 80 || (_1099.id === undefined && _1099.type === "LParen"))) { c.idx++; _1098 = _1099; }
4140
- else { if (c.track) { E(c, "LParen"); } _1098 = F; }
4141
- if (_1098 === F) { c.idx = _1097; _1095 = F; break L_1096; }
4142
-
4143
- const _1101 = c.ruleDepth;
4144
- if (c.track) { c.ruleNames[_1101] = "Query"; c.ruleDepth = _1101 + 1; }
4145
- const _1100 = R[2](c);
4146
- if (c.track) c.ruleDepth = _1101;
4147
- if (_1100 === F) { c.idx = _1097; _1095 = F; break L_1096; }
4148
- let _1102;
4149
- const _1103 = c.tokens[c.idx];
4150
- if (_1103 !== undefined && (_1103.id === 81 || (_1103.id === undefined && _1103.type === "RParen"))) { c.idx++; _1102 = _1103; }
4151
- else { if (c.track) { E(c, "RParen"); } _1102 = F; }
4152
- if (_1102 === F) { c.idx = _1097; _1095 = F; break L_1096; }
4153
- _1095 = _1100;
4154
- }
4155
- if (_1095 !== F) _1090["q"] = _1095;
4156
- const _1094 = _1095;
4157
- if (_1094 === F) { c.idx = _1088; c.bindings = _1091; _1087 = F; break L_1089; }
4158
- const _1104 = H[47](_1090, c);
4159
- c.bindings = _1091;
4160
- _1087 = _1104;
4161
- }
4162
- return _1087;
4145
+ let _1089;
4146
+ L_1091: {
4147
+ const _1090 = c.idx;
4148
+ const _1093 = c.bindings;
4149
+ const _1092 = {};
4150
+ c.bindings = _1092;
4151
+ let _1094;
4152
+ const _1095 = c.tokens[c.idx];
4153
+ if (_1095 !== undefined && (_1095.id === 50 || (_1095.id === undefined && _1095.type === "Exists"))) { c.idx++; _1094 = _1095; }
4154
+ else { if (c.track) { E(c, "Exists"); } _1094 = F; }
4155
+ if (_1094 === F) { c.idx = _1090; c.bindings = _1093; _1089 = F; break L_1091; }
4156
+
4157
+ let _1097;
4158
+ L_1098: {
4159
+ const _1099 = c.idx;
4160
+ let _1100;
4161
+ const _1101 = c.tokens[c.idx];
4162
+ if (_1101 !== undefined && (_1101.id === 82 || (_1101.id === undefined && _1101.type === "LParen"))) { c.idx++; _1100 = _1101; }
4163
+ else { if (c.track) { E(c, "LParen"); } _1100 = F; }
4164
+ if (_1100 === F) { c.idx = _1099; _1097 = F; break L_1098; }
4165
+
4166
+ const _1103 = c.ruleDepth;
4167
+ if (c.track) { c.ruleNames[_1103] = "Query"; c.ruleDepth = _1103 + 1; }
4168
+ const _1102 = R[2](c);
4169
+ if (c.track) c.ruleDepth = _1103;
4170
+ if (_1102 === F) { c.idx = _1099; _1097 = F; break L_1098; }
4171
+ let _1104;
4172
+ const _1105 = c.tokens[c.idx];
4173
+ if (_1105 !== undefined && (_1105.id === 83 || (_1105.id === undefined && _1105.type === "RParen"))) { c.idx++; _1104 = _1105; }
4174
+ else { if (c.track) { E(c, "RParen"); } _1104 = F; }
4175
+ if (_1104 === F) { c.idx = _1099; _1097 = F; break L_1098; }
4176
+ _1097 = _1102;
4177
+ }
4178
+ if (_1097 !== F) _1092["q"] = _1097;
4179
+ const _1096 = _1097;
4180
+ if (_1096 === F) { c.idx = _1090; c.bindings = _1093; _1089 = F; break L_1091; }
4181
+ const _1106 = H[47](_1092, c);
4182
+ c.bindings = _1093;
4183
+ _1089 = _1106;
4184
+ }
4185
+ return _1089;
4163
4186
  }
4164
4187
 
4165
4188
  // CaseExpr
4166
4189
  R[49] = (c) => {
4167
4190
 
4168
- let _1105;
4169
- L_1107: {
4170
- const _1106 = c.idx;
4171
- const _1109 = c.bindings;
4172
- const _1108 = {};
4173
- c.bindings = _1108;
4174
- let _1110;
4175
- const _1111 = c.tokens[c.idx];
4176
- if (_1111 !== undefined && (_1111.id === 41 || (_1111.id === undefined && _1111.type === "Case"))) { c.idx++; _1110 = _1111; }
4177
- else { if (c.track) { E(c, "Case"); } _1110 = F; }
4178
- if (_1110 === F) { c.idx = _1106; c.bindings = _1109; _1105 = F; break L_1107; }
4179
- let _1113;
4180
- const _1114 = c.idx;
4191
+ let _1107;
4192
+ L_1109: {
4193
+ const _1108 = c.idx;
4194
+ const _1111 = c.bindings;
4195
+ const _1110 = {};
4196
+ c.bindings = _1110;
4197
+ let _1112;
4198
+ const _1113 = c.tokens[c.idx];
4199
+ if (_1113 !== undefined && (_1113.id === 41 || (_1113.id === undefined && _1113.type === "Case"))) { c.idx++; _1112 = _1113; }
4200
+ else { if (c.track) { E(c, "Case"); } _1112 = F; }
4201
+ if (_1112 === F) { c.idx = _1108; c.bindings = _1111; _1107 = F; break L_1109; }
4202
+ let _1115;
4203
+ const _1116 = c.idx;
4181
4204
  {
4182
4205
 
4183
- const _1116 = c.ruleDepth;
4184
- if (c.track) { c.ruleNames[_1116] = "Expression"; c.ruleDepth = _1116 + 1; }
4185
- const _1115 = R[19](c);
4186
- if (c.track) c.ruleDepth = _1116;
4187
- if (_1115 === F) { c.idx = _1114; _1113 = null; } else _1113 = _1115;
4206
+ const _1118 = c.ruleDepth;
4207
+ if (c.track) { c.ruleNames[_1118] = "Expression"; c.ruleDepth = _1118 + 1; }
4208
+ const _1117 = R[19](c);
4209
+ if (c.track) c.ruleDepth = _1118;
4210
+ if (_1117 === F) { c.idx = _1116; _1115 = null; } else _1115 = _1117;
4188
4211
  }
4189
- if (_1113 !== F) _1108["subject"] = _1113;
4190
- const _1112 = _1113;
4191
- if (_1112 === F) { c.idx = _1106; c.bindings = _1109; _1105 = F; break L_1107; }
4192
-
4193
- let _1118 = [];
4194
- L_1120: {
4195
- const _1121 = c.idx;
4212
+ if (_1115 !== F) _1110["subject"] = _1115;
4213
+ const _1114 = _1115;
4214
+ if (_1114 === F) { c.idx = _1108; c.bindings = _1111; _1107 = F; break L_1109; }
4196
4215
 
4197
- const _1123 = c.ruleDepth;
4198
- if (c.track) { c.ruleNames[_1123] = "WhenClause"; c.ruleDepth = _1123 + 1; }
4199
- const _1122 = R[57](c);
4200
- if (c.track) c.ruleDepth = _1123;
4201
- if (_1122 === F) { c.idx = _1121; _1118 = F; break L_1120; }
4202
- if (c.idx === _1121) P("many1", _1121);
4203
- _1118.push(_1122);
4204
- for (;;) {
4205
- const _1119 = c.idx;
4216
+ let _1120 = [];
4217
+ L_1122: {
4218
+ const _1123 = c.idx;
4206
4219
 
4207
4220
  const _1125 = c.ruleDepth;
4208
4221
  if (c.track) { c.ruleNames[_1125] = "WhenClause"; c.ruleDepth = _1125 + 1; }
4209
- const _1124 = R[57](c);
4222
+ const _1124 = R[58](c);
4210
4223
  if (c.track) c.ruleDepth = _1125;
4211
- if (_1124 === F) { c.idx = _1119; break; }
4212
- if (c.idx === _1119) P("many1", _1119);
4213
- _1118.push(_1124);
4224
+ if (_1124 === F) { c.idx = _1123; _1120 = F; break L_1122; }
4225
+ if (c.idx === _1123) P("many1", _1123);
4226
+ _1120.push(_1124);
4227
+ for (;;) {
4228
+ const _1121 = c.idx;
4229
+
4230
+ const _1127 = c.ruleDepth;
4231
+ if (c.track) { c.ruleNames[_1127] = "WhenClause"; c.ruleDepth = _1127 + 1; }
4232
+ const _1126 = R[58](c);
4233
+ if (c.track) c.ruleDepth = _1127;
4234
+ if (_1126 === F) { c.idx = _1121; break; }
4235
+ if (c.idx === _1121) P("many1", _1121);
4236
+ _1120.push(_1126);
4214
4237
  }
4215
4238
  }
4216
- if (_1118 !== F) _1108["whens"] = _1118;
4217
- const _1117 = _1118;
4218
- if (_1117 === F) { c.idx = _1106; c.bindings = _1109; _1105 = F; break L_1107; }
4219
- let _1127;
4220
- const _1128 = c.idx;
4239
+ if (_1120 !== F) _1110["whens"] = _1120;
4240
+ const _1119 = _1120;
4241
+ if (_1119 === F) { c.idx = _1108; c.bindings = _1111; _1107 = F; break L_1109; }
4242
+ let _1129;
4243
+ const _1130 = c.idx;
4221
4244
  {
4222
4245
 
4223
- let _1129;
4224
- L_1130: {
4225
- const _1131 = c.idx;
4226
- let _1132;
4227
- const _1133 = c.tokens[c.idx];
4228
- if (_1133 !== undefined && (_1133.id === 44 || (_1133.id === undefined && _1133.type === "Else"))) { c.idx++; _1132 = _1133; }
4229
- else { if (c.track) { E(c, "Else"); } _1132 = F; }
4230
- if (_1132 === F) { c.idx = _1131; _1129 = F; break L_1130; }
4231
-
4232
- const _1135 = c.ruleDepth;
4233
- if (c.track) { c.ruleNames[_1135] = "Expression"; c.ruleDepth = _1135 + 1; }
4234
- const _1134 = R[19](c);
4235
- if (c.track) c.ruleDepth = _1135;
4236
- if (_1134 === F) { c.idx = _1131; _1129 = F; break L_1130; }
4237
- _1129 = _1134;
4238
- }
4239
- if (_1129 === F) { c.idx = _1128; _1127 = null; } else _1127 = _1129;
4240
- }
4241
- if (_1127 !== F) _1108["otherwise"] = _1127;
4242
- const _1126 = _1127;
4243
- if (_1126 === F) { c.idx = _1106; c.bindings = _1109; _1105 = F; break L_1107; }
4244
- let _1136;
4245
- const _1137 = c.tokens[c.idx];
4246
- if (_1137 !== undefined && (_1137.id === 45 || (_1137.id === undefined && _1137.type === "End"))) { c.idx++; _1136 = _1137; }
4247
- else { if (c.track) { E(c, "End"); } _1136 = F; }
4248
- if (_1136 === F) { c.idx = _1106; c.bindings = _1109; _1105 = F; break L_1107; }
4249
- const _1138 = H[48](_1108, c);
4250
- c.bindings = _1109;
4251
- _1105 = _1138;
4252
- }
4253
- return _1105;
4246
+ let _1131;
4247
+ L_1132: {
4248
+ const _1133 = c.idx;
4249
+ let _1134;
4250
+ const _1135 = c.tokens[c.idx];
4251
+ if (_1135 !== undefined && (_1135.id === 44 || (_1135.id === undefined && _1135.type === "Else"))) { c.idx++; _1134 = _1135; }
4252
+ else { if (c.track) { E(c, "Else"); } _1134 = F; }
4253
+ if (_1134 === F) { c.idx = _1133; _1131 = F; break L_1132; }
4254
+
4255
+ const _1137 = c.ruleDepth;
4256
+ if (c.track) { c.ruleNames[_1137] = "Expression"; c.ruleDepth = _1137 + 1; }
4257
+ const _1136 = R[19](c);
4258
+ if (c.track) c.ruleDepth = _1137;
4259
+ if (_1136 === F) { c.idx = _1133; _1131 = F; break L_1132; }
4260
+ _1131 = _1136;
4261
+ }
4262
+ if (_1131 === F) { c.idx = _1130; _1129 = null; } else _1129 = _1131;
4263
+ }
4264
+ if (_1129 !== F) _1110["otherwise"] = _1129;
4265
+ const _1128 = _1129;
4266
+ if (_1128 === F) { c.idx = _1108; c.bindings = _1111; _1107 = F; break L_1109; }
4267
+ let _1138;
4268
+ const _1139 = c.tokens[c.idx];
4269
+ if (_1139 !== undefined && (_1139.id === 45 || (_1139.id === undefined && _1139.type === "End"))) { c.idx++; _1138 = _1139; }
4270
+ else { if (c.track) { E(c, "End"); } _1138 = F; }
4271
+ if (_1138 === F) { c.idx = _1108; c.bindings = _1111; _1107 = F; break L_1109; }
4272
+ const _1140 = H[48](_1110, c);
4273
+ c.bindings = _1111;
4274
+ _1107 = _1140;
4275
+ }
4276
+ return _1107;
4254
4277
  }
4255
4278
 
4256
4279
  // CastExpr
4257
4280
  R[50] = (c) => {
4258
4281
 
4259
- let _1139;
4260
- L_1141: {
4261
- const _1140 = c.idx;
4262
- const _1143 = c.bindings;
4263
- const _1142 = {};
4264
- c.bindings = _1142;
4265
- let _1144;
4266
- const _1145 = c.tokens[c.idx];
4267
- if (_1145 !== undefined && (_1145.id === 51 || (_1145.id === undefined && _1145.type === "Cast"))) { c.idx++; _1144 = _1145; }
4268
- else { if (c.track) { E(c, "Cast"); } _1144 = F; }
4269
- if (_1144 === F) { c.idx = _1140; c.bindings = _1143; _1139 = F; break L_1141; }
4282
+ let _1141;
4283
+ L_1143: {
4284
+ const _1142 = c.idx;
4285
+ const _1145 = c.bindings;
4286
+ const _1144 = {};
4287
+ c.bindings = _1144;
4270
4288
  let _1146;
4271
4289
  const _1147 = c.tokens[c.idx];
4272
- if (_1147 !== undefined && (_1147.id === 80 || (_1147.id === undefined && _1147.type === "LParen"))) { c.idx++; _1146 = _1147; }
4273
- else { if (c.track) { E(c, "LParen"); } _1146 = F; }
4274
- if (_1146 === F) { c.idx = _1140; c.bindings = _1143; _1139 = F; break L_1141; }
4275
-
4276
- const _1150 = c.ruleDepth;
4277
- if (c.track) { c.ruleNames[_1150] = "Expression"; c.ruleDepth = _1150 + 1; }
4278
- const _1149 = R[19](c);
4279
- if (c.track) c.ruleDepth = _1150;
4280
- if (_1149 !== F) _1142["e"] = _1149;
4281
- const _1148 = _1149;
4282
- if (_1148 === F) { c.idx = _1140; c.bindings = _1143; _1139 = F; break L_1141; }
4283
- let _1151;
4284
- const _1152 = c.tokens[c.idx];
4285
- if (_1152 !== undefined && (_1152.id === 6 || (_1152.id === undefined && _1152.type === "As"))) { c.idx++; _1151 = _1152; }
4286
- else { if (c.track) { E(c, "As"); } _1151 = F; }
4287
- if (_1151 === F) { c.idx = _1140; c.bindings = _1143; _1139 = F; break L_1141; }
4288
-
4289
- const _1155 = c.ruleDepth;
4290
- if (c.track) { c.ruleNames[_1155] = "TypeName"; c.ruleDepth = _1155 + 1; }
4291
- const _1154 = R[44](c);
4292
- if (c.track) c.ruleDepth = _1155;
4293
- if (_1154 !== F) _1142["t"] = _1154;
4294
- const _1153 = _1154;
4295
- if (_1153 === F) { c.idx = _1140; c.bindings = _1143; _1139 = F; break L_1141; }
4296
- let _1156;
4297
- const _1157 = c.tokens[c.idx];
4298
- if (_1157 !== undefined && (_1157.id === 81 || (_1157.id === undefined && _1157.type === "RParen"))) { c.idx++; _1156 = _1157; }
4299
- else { if (c.track) { E(c, "RParen"); } _1156 = F; }
4300
- if (_1156 === F) { c.idx = _1140; c.bindings = _1143; _1139 = F; break L_1141; }
4301
- const _1158 = H[49](_1142, c);
4302
- c.bindings = _1143;
4303
- _1139 = _1158;
4304
- }
4305
- return _1139;
4290
+ if (_1147 !== undefined && (_1147.id === 51 || (_1147.id === undefined && _1147.type === "Cast"))) { c.idx++; _1146 = _1147; }
4291
+ else { if (c.track) { E(c, "Cast"); } _1146 = F; }
4292
+ if (_1146 === F) { c.idx = _1142; c.bindings = _1145; _1141 = F; break L_1143; }
4293
+ let _1148;
4294
+ const _1149 = c.tokens[c.idx];
4295
+ if (_1149 !== undefined && (_1149.id === 82 || (_1149.id === undefined && _1149.type === "LParen"))) { c.idx++; _1148 = _1149; }
4296
+ else { if (c.track) { E(c, "LParen"); } _1148 = F; }
4297
+ if (_1148 === F) { c.idx = _1142; c.bindings = _1145; _1141 = F; break L_1143; }
4298
+
4299
+ const _1152 = c.ruleDepth;
4300
+ if (c.track) { c.ruleNames[_1152] = "Expression"; c.ruleDepth = _1152 + 1; }
4301
+ const _1151 = R[19](c);
4302
+ if (c.track) c.ruleDepth = _1152;
4303
+ if (_1151 !== F) _1144["e"] = _1151;
4304
+ const _1150 = _1151;
4305
+ if (_1150 === F) { c.idx = _1142; c.bindings = _1145; _1141 = F; break L_1143; }
4306
+ let _1153;
4307
+ const _1154 = c.tokens[c.idx];
4308
+ if (_1154 !== undefined && (_1154.id === 6 || (_1154.id === undefined && _1154.type === "As"))) { c.idx++; _1153 = _1154; }
4309
+ else { if (c.track) { E(c, "As"); } _1153 = F; }
4310
+ if (_1153 === F) { c.idx = _1142; c.bindings = _1145; _1141 = F; break L_1143; }
4311
+
4312
+ const _1157 = c.ruleDepth;
4313
+ if (c.track) { c.ruleNames[_1157] = "TypeName"; c.ruleDepth = _1157 + 1; }
4314
+ const _1156 = R[44](c);
4315
+ if (c.track) c.ruleDepth = _1157;
4316
+ if (_1156 !== F) _1144["t"] = _1156;
4317
+ const _1155 = _1156;
4318
+ if (_1155 === F) { c.idx = _1142; c.bindings = _1145; _1141 = F; break L_1143; }
4319
+ let _1158;
4320
+ const _1159 = c.tokens[c.idx];
4321
+ if (_1159 !== undefined && (_1159.id === 83 || (_1159.id === undefined && _1159.type === "RParen"))) { c.idx++; _1158 = _1159; }
4322
+ else { if (c.track) { E(c, "RParen"); } _1158 = F; }
4323
+ if (_1158 === F) { c.idx = _1142; c.bindings = _1145; _1141 = F; break L_1143; }
4324
+ const _1160 = H[49](_1144, c);
4325
+ c.bindings = _1145;
4326
+ _1141 = _1160;
4327
+ }
4328
+ return _1141;
4306
4329
  }
4307
4330
 
4308
4331
  // ExtractExpr
4309
4332
  R[51] = (c) => {
4310
4333
 
4311
- let _1159;
4312
- L_1161: {
4313
- const _1160 = c.idx;
4314
- const _1163 = c.bindings;
4315
- const _1162 = {};
4316
- c.bindings = _1162;
4317
- let _1164;
4318
- const _1165 = c.tokens[c.idx];
4319
- if (_1165 !== undefined && (_1165.id === 52 || (_1165.id === undefined && _1165.type === "Extract"))) { c.idx++; _1164 = _1165; }
4320
- else { if (c.track) { E(c, "Extract"); } _1164 = F; }
4321
- if (_1164 === F) { c.idx = _1160; c.bindings = _1163; _1159 = F; break L_1161; }
4334
+ let _1161;
4335
+ L_1163: {
4336
+ const _1162 = c.idx;
4337
+ const _1165 = c.bindings;
4338
+ const _1164 = {};
4339
+ c.bindings = _1164;
4322
4340
  let _1166;
4323
4341
  const _1167 = c.tokens[c.idx];
4324
- if (_1167 !== undefined && (_1167.id === 80 || (_1167.id === undefined && _1167.type === "LParen"))) { c.idx++; _1166 = _1167; }
4325
- else { if (c.track) { E(c, "LParen"); } _1166 = F; }
4326
- if (_1166 === F) { c.idx = _1160; c.bindings = _1163; _1159 = F; break L_1161; }
4327
-
4328
- const _1170 = c.ruleDepth;
4329
- if (c.track) { c.ruleNames[_1170] = "Ident"; c.ruleDepth = _1170 + 1; }
4330
- const _1169 = R[15](c);
4331
- if (c.track) c.ruleDepth = _1170;
4332
- if (_1169 !== F) _1162["field"] = _1169;
4333
- const _1168 = _1169;
4334
- if (_1168 === F) { c.idx = _1160; c.bindings = _1163; _1159 = F; break L_1161; }
4335
- let _1171;
4336
- const _1172 = c.tokens[c.idx];
4337
- if (_1172 !== undefined && (_1172.id === 4 || (_1172.id === undefined && _1172.type === "From"))) { c.idx++; _1171 = _1172; }
4338
- else { if (c.track) { E(c, "From"); } _1171 = F; }
4339
- if (_1171 === F) { c.idx = _1160; c.bindings = _1163; _1159 = F; break L_1161; }
4340
-
4341
- const _1175 = c.ruleDepth;
4342
- if (c.track) { c.ruleNames[_1175] = "Expression"; c.ruleDepth = _1175 + 1; }
4343
- const _1174 = R[19](c);
4344
- if (c.track) c.ruleDepth = _1175;
4345
- if (_1174 !== F) _1162["e"] = _1174;
4346
- const _1173 = _1174;
4347
- if (_1173 === F) { c.idx = _1160; c.bindings = _1163; _1159 = F; break L_1161; }
4348
- let _1176;
4349
- const _1177 = c.tokens[c.idx];
4350
- if (_1177 !== undefined && (_1177.id === 81 || (_1177.id === undefined && _1177.type === "RParen"))) { c.idx++; _1176 = _1177; }
4351
- else { if (c.track) { E(c, "RParen"); } _1176 = F; }
4352
- if (_1176 === F) { c.idx = _1160; c.bindings = _1163; _1159 = F; break L_1161; }
4353
- const _1178 = H[50](_1162, c);
4354
- c.bindings = _1163;
4355
- _1159 = _1178;
4356
- }
4357
- return _1159;
4358
- }
4359
-
4360
- // FunctionCall
4342
+ if (_1167 !== undefined && (_1167.id === 52 || (_1167.id === undefined && _1167.type === "Extract"))) { c.idx++; _1166 = _1167; }
4343
+ else { if (c.track) { E(c, "Extract"); } _1166 = F; }
4344
+ if (_1166 === F) { c.idx = _1162; c.bindings = _1165; _1161 = F; break L_1163; }
4345
+ let _1168;
4346
+ const _1169 = c.tokens[c.idx];
4347
+ if (_1169 !== undefined && (_1169.id === 82 || (_1169.id === undefined && _1169.type === "LParen"))) { c.idx++; _1168 = _1169; }
4348
+ else { if (c.track) { E(c, "LParen"); } _1168 = F; }
4349
+ if (_1168 === F) { c.idx = _1162; c.bindings = _1165; _1161 = F; break L_1163; }
4350
+
4351
+ const _1172 = c.ruleDepth;
4352
+ if (c.track) { c.ruleNames[_1172] = "Ident"; c.ruleDepth = _1172 + 1; }
4353
+ const _1171 = R[15](c);
4354
+ if (c.track) c.ruleDepth = _1172;
4355
+ if (_1171 !== F) _1164["field"] = _1171;
4356
+ const _1170 = _1171;
4357
+ if (_1170 === F) { c.idx = _1162; c.bindings = _1165; _1161 = F; break L_1163; }
4358
+ let _1173;
4359
+ const _1174 = c.tokens[c.idx];
4360
+ if (_1174 !== undefined && (_1174.id === 4 || (_1174.id === undefined && _1174.type === "From"))) { c.idx++; _1173 = _1174; }
4361
+ else { if (c.track) { E(c, "From"); } _1173 = F; }
4362
+ if (_1173 === F) { c.idx = _1162; c.bindings = _1165; _1161 = F; break L_1163; }
4363
+
4364
+ const _1177 = c.ruleDepth;
4365
+ if (c.track) { c.ruleNames[_1177] = "Expression"; c.ruleDepth = _1177 + 1; }
4366
+ const _1176 = R[19](c);
4367
+ if (c.track) c.ruleDepth = _1177;
4368
+ if (_1176 !== F) _1164["e"] = _1176;
4369
+ const _1175 = _1176;
4370
+ if (_1175 === F) { c.idx = _1162; c.bindings = _1165; _1161 = F; break L_1163; }
4371
+ let _1178;
4372
+ const _1179 = c.tokens[c.idx];
4373
+ if (_1179 !== undefined && (_1179.id === 83 || (_1179.id === undefined && _1179.type === "RParen"))) { c.idx++; _1178 = _1179; }
4374
+ else { if (c.track) { E(c, "RParen"); } _1178 = F; }
4375
+ if (_1178 === F) { c.idx = _1162; c.bindings = _1165; _1161 = F; break L_1163; }
4376
+ const _1180 = H[50](_1164, c);
4377
+ c.bindings = _1165;
4378
+ _1161 = _1180;
4379
+ }
4380
+ return _1161;
4381
+ }
4382
+
4383
+ // PivotExpr
4361
4384
  R[52] = (c) => {
4362
4385
 
4363
- let _1179;
4364
- L_1181: {
4365
- const _1180 = c.idx;
4366
- const _1183 = c.bindings;
4367
- const _1182 = {};
4368
- c.bindings = _1182;
4369
-
4370
- let _1185;
4371
- L_1186: {
4386
+ let _1181;
4387
+ L_1183: {
4388
+ const _1182 = c.idx;
4389
+ const _1185 = c.bindings;
4390
+ const _1184 = {};
4391
+ c.bindings = _1184;
4392
+ let _1186;
4372
4393
  const _1187 = c.tokens[c.idx];
4373
- if (_1187 === undefined) { if (c.track) { E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); } _1185 = F; break L_1186; }
4374
- const _1188 = _1187.id !== undefined ? _1187.id : I[_1187.type];
4375
- switch (_1188) {
4376
- case 60: case 58: case 59: {
4377
-
4378
- const _1190 = c.ruleDepth;
4379
- if (c.track) { c.ruleNames[_1190] = "Ident"; c.ruleDepth = _1190 + 1; }
4380
- const _1189 = R[15](c);
4381
- if (c.track) c.ruleDepth = _1190;
4382
- _1185 = _1189; break L_1186;
4383
- }
4384
- case 19: case 20: {
4385
- let _1192;
4386
- const _1193 = c.tokens[c.idx];
4387
- if (_1193 !== undefined && ((_1193.id === 19 || (_1193.id === undefined && _1193.type === "Left")) || (_1193.id === 20 || (_1193.id === undefined && _1193.type === "Right")))) { c.idx++; _1192 = _1193; }
4388
- else { if (c.track) { E(c, "Left"); E(c, "Right"); } _1192 = F; }
4389
- const _1191 = _1192 === F ? F : H[51](_1192, c);
4390
- _1185 = _1191; break L_1186;
4391
- }
4392
- default: { if (c.track) { E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); } _1185 = F; break L_1186; }
4393
- }
4394
- }
4395
- if (_1185 !== F) _1182["name"] = _1185;
4396
- const _1184 = _1185;
4397
- if (_1184 === F) { c.idx = _1180; c.bindings = _1183; _1179 = F; break L_1181; }
4398
- let _1194;
4399
- const _1195 = c.tokens[c.idx];
4400
- if (_1195 !== undefined && (_1195.id === 80 || (_1195.id === undefined && _1195.type === "LParen"))) { c.idx++; _1194 = _1195; }
4401
- else { if (c.track) { E(c, "LParen"); } _1194 = F; }
4402
- if (_1194 === F) { c.idx = _1180; c.bindings = _1183; _1179 = F; break L_1181; }
4403
- let _1197;
4404
- const _1198 = c.idx;
4405
- {
4406
- let _1199;
4407
- const _1200 = c.tokens[c.idx];
4408
- if (_1200 !== undefined && (_1200.id === 7 || (_1200.id === undefined && _1200.type === "Distinct"))) { c.idx++; _1199 = _1200; }
4409
- else { if (c.track) { E(c, "Distinct"); } _1199 = F; }
4410
- if (_1199 === F) { c.idx = _1198; _1197 = false; } else _1197 = true;
4411
- }
4412
- if (_1197 !== F) _1182["distinct"] = _1197;
4413
- const _1196 = _1197;
4414
- if (_1196 === F) { c.idx = _1180; c.bindings = _1183; _1179 = F; break L_1181; }
4415
- let _1202;
4416
- const _1203 = c.idx;
4417
- {
4418
- let _1204;
4419
- const _1205 = c.tokens[c.idx];
4420
- if (_1205 !== undefined && (_1205.id === 77 || (_1205.id === undefined && _1205.type === "Star"))) { c.idx++; _1204 = _1205; }
4421
- else { if (c.track) { E(c, "Star"); } _1204 = F; }
4422
- if (_1204 === F) { c.idx = _1203; _1202 = false; } else _1202 = true;
4423
- }
4424
- if (_1202 !== F) _1182["star"] = _1202;
4425
- const _1201 = _1202;
4426
- if (_1201 === F) { c.idx = _1180; c.bindings = _1183; _1179 = F; break L_1181; }
4427
-
4428
- let _1207 = [];
4429
- L_1211: {
4430
- const _1208 = c.idx;
4394
+ if (_1187 !== undefined && (_1187.id === 57 || (_1187.id === undefined && _1187.type === "Pivot"))) { c.idx++; _1186 = _1187; }
4395
+ else { if (c.track) { E(c, "Pivot"); } _1186 = F; }
4396
+ if (_1186 === F) { c.idx = _1182; c.bindings = _1185; _1181 = F; break L_1183; }
4397
+ let _1188;
4398
+ const _1189 = c.tokens[c.idx];
4399
+ if (_1189 !== undefined && (_1189.id === 82 || (_1189.id === undefined && _1189.type === "LParen"))) { c.idx++; _1188 = _1189; }
4400
+ else { if (c.track) { E(c, "LParen"); } _1188 = F; }
4401
+ if (_1188 === F) { c.idx = _1182; c.bindings = _1185; _1181 = F; break L_1183; }
4402
+
4403
+ const _1192 = c.ruleDepth;
4404
+ if (c.track) { c.ruleNames[_1192] = "Expression"; c.ruleDepth = _1192 + 1; }
4405
+ const _1191 = R[19](c);
4406
+ if (c.track) c.ruleDepth = _1192;
4407
+ if (_1191 !== F) _1184["agg"] = _1191;
4408
+ const _1190 = _1191;
4409
+ if (_1190 === F) { c.idx = _1182; c.bindings = _1185; _1181 = F; break L_1183; }
4410
+ let _1193;
4411
+ const _1194 = c.tokens[c.idx];
4412
+ if (_1194 !== undefined && (_1194.id === 56 || (_1194.id === undefined && _1194.type === "For"))) { c.idx++; _1193 = _1194; }
4413
+ else { if (c.track) { E(c, "For"); } _1193 = F; }
4414
+ if (_1193 === F) { c.idx = _1182; c.bindings = _1185; _1181 = F; break L_1183; }
4415
+
4416
+ const _1197 = c.ruleDepth;
4417
+ if (c.track) { c.ruleNames[_1197] = "ConcatExpr"; c.ruleDepth = _1197 + 1; }
4418
+ const _1196 = R[56](c);
4419
+ if (c.track) c.ruleDepth = _1197;
4420
+ if (_1196 !== F) _1184["col"] = _1196;
4421
+ const _1195 = _1196;
4422
+ if (_1195 === F) { c.idx = _1182; c.bindings = _1185; _1181 = F; break L_1183; }
4423
+ let _1198;
4424
+ const _1199 = c.tokens[c.idx];
4425
+ if (_1199 !== undefined && (_1199.id === 12 || (_1199.id === undefined && _1199.type === "In"))) { c.idx++; _1198 = _1199; }
4426
+ else { if (c.track) { E(c, "In"); } _1198 = F; }
4427
+ if (_1198 === F) { c.idx = _1182; c.bindings = _1185; _1181 = F; break L_1183; }
4428
+ let _1200;
4429
+ const _1201 = c.tokens[c.idx];
4430
+ if (_1201 !== undefined && (_1201.id === 82 || (_1201.id === undefined && _1201.type === "LParen"))) { c.idx++; _1200 = _1201; }
4431
+ else { if (c.track) { E(c, "LParen"); } _1200 = F; }
4432
+ if (_1200 === F) { c.idx = _1182; c.bindings = _1185; _1181 = F; break L_1183; }
4433
+
4434
+ let _1203 = [];
4435
+ L_1207: {
4436
+ const _1204 = c.idx;
4437
+
4438
+ const _1209 = c.ruleDepth;
4439
+ if (c.track) { c.ruleNames[_1209] = "Expression"; c.ruleDepth = _1209 + 1; }
4440
+ const _1208 = R[19](c);
4441
+ if (c.track) c.ruleDepth = _1209;
4442
+ if (_1208 === F) { c.idx = _1204; _1203 = F; break L_1207; }
4443
+ _1203.push(_1208);
4444
+ for (;;) {
4445
+ const _1205 = c.idx;
4446
+ let _1210;
4447
+ const _1211 = c.tokens[c.idx];
4448
+ if (_1211 !== undefined && (_1211.id === 86 || (_1211.id === undefined && _1211.type === "Comma"))) { c.idx++; _1210 = _1211; }
4449
+ else { if (c.track) { E(c, "Comma"); } _1210 = F; }
4450
+ if (_1210 === F) { c.idx = _1205; break; }
4451
+ const _1206 = c.idx;
4431
4452
 
4432
4453
  const _1213 = c.ruleDepth;
4433
4454
  if (c.track) { c.ruleNames[_1213] = "Expression"; c.ruleDepth = _1213 + 1; }
4434
4455
  const _1212 = R[19](c);
4435
4456
  if (c.track) c.ruleDepth = _1213;
4436
- if (_1212 === F) { c.idx = _1208; _1207 = []; break L_1211; }
4437
- _1207.push(_1212);
4438
- for (;;) {
4439
- const _1209 = c.idx;
4457
+ if (_1212 === F) { c.idx = _1205; break; }
4458
+ _1203.push(_1212);
4459
+ }
4460
+ }
4461
+ if (_1203 !== F) _1184["values"] = _1203;
4462
+ const _1202 = _1203;
4463
+ if (_1202 === F) { c.idx = _1182; c.bindings = _1185; _1181 = F; break L_1183; }
4440
4464
  let _1214;
4441
4465
  const _1215 = c.tokens[c.idx];
4442
- if (_1215 !== undefined && (_1215.id === 84 || (_1215.id === undefined && _1215.type === "Comma"))) { c.idx++; _1214 = _1215; }
4443
- else { if (c.track) { E(c, "Comma"); } _1214 = F; }
4444
- if (_1214 === F) { c.idx = _1209; break; }
4445
- const _1210 = c.idx;
4446
-
4447
- const _1217 = c.ruleDepth;
4448
- if (c.track) { c.ruleNames[_1217] = "Expression"; c.ruleDepth = _1217 + 1; }
4449
- const _1216 = R[19](c);
4450
- if (c.track) c.ruleDepth = _1217;
4451
- if (_1216 === F) { c.idx = _1209; break; }
4452
- _1207.push(_1216);
4453
- }
4454
- }
4455
- if (_1207 !== F) _1182["args"] = _1207;
4456
- const _1206 = _1207;
4457
- if (_1206 === F) { c.idx = _1180; c.bindings = _1183; _1179 = F; break L_1181; }
4466
+ if (_1215 !== undefined && (_1215.id === 83 || (_1215.id === undefined && _1215.type === "RParen"))) { c.idx++; _1214 = _1215; }
4467
+ else { if (c.track) { E(c, "RParen"); } _1214 = F; }
4468
+ if (_1214 === F) { c.idx = _1182; c.bindings = _1185; _1181 = F; break L_1183; }
4469
+ let _1216;
4470
+ const _1217 = c.tokens[c.idx];
4471
+ if (_1217 !== undefined && (_1217.id === 83 || (_1217.id === undefined && _1217.type === "RParen"))) { c.idx++; _1216 = _1217; }
4472
+ else { if (c.track) { E(c, "RParen"); } _1216 = F; }
4473
+ if (_1216 === F) { c.idx = _1182; c.bindings = _1185; _1181 = F; break L_1183; }
4474
+ const _1218 = H[51](_1184, c);
4475
+ c.bindings = _1185;
4476
+ _1181 = _1218;
4477
+ }
4478
+ return _1181;
4479
+ }
4480
+
4481
+ // FunctionCall
4482
+ R[53] = (c) => {
4483
+
4458
4484
  let _1219;
4485
+ L_1221: {
4459
4486
  const _1220 = c.idx;
4487
+ const _1223 = c.bindings;
4488
+ const _1222 = {};
4489
+ c.bindings = _1222;
4490
+
4491
+ let _1225;
4492
+ L_1226: {
4493
+ const _1227 = c.tokens[c.idx];
4494
+ if (_1227 === undefined) { if (c.track) { E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); } _1225 = F; break L_1226; }
4495
+ const _1228 = _1227.id !== undefined ? _1227.id : I[_1227.type];
4496
+ switch (_1228) {
4497
+ case 62: case 60: case 61: {
4498
+
4499
+ const _1230 = c.ruleDepth;
4500
+ if (c.track) { c.ruleNames[_1230] = "Ident"; c.ruleDepth = _1230 + 1; }
4501
+ const _1229 = R[15](c);
4502
+ if (c.track) c.ruleDepth = _1230;
4503
+ _1225 = _1229; break L_1226;
4504
+ }
4505
+ case 19: case 20: {
4506
+ let _1232;
4507
+ const _1233 = c.tokens[c.idx];
4508
+ if (_1233 !== undefined && ((_1233.id === 19 || (_1233.id === undefined && _1233.type === "Left")) || (_1233.id === 20 || (_1233.id === undefined && _1233.type === "Right")))) { c.idx++; _1232 = _1233; }
4509
+ else { if (c.track) { E(c, "Left"); E(c, "Right"); } _1232 = F; }
4510
+ const _1231 = _1232 === F ? F : H[52](_1232, c);
4511
+ _1225 = _1231; break L_1226;
4512
+ }
4513
+ default: { if (c.track) { E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); } _1225 = F; break L_1226; }
4514
+ }
4515
+ }
4516
+ if (_1225 !== F) _1222["name"] = _1225;
4517
+ const _1224 = _1225;
4518
+ if (_1224 === F) { c.idx = _1220; c.bindings = _1223; _1219 = F; break L_1221; }
4519
+ let _1234;
4520
+ const _1235 = c.tokens[c.idx];
4521
+ if (_1235 !== undefined && (_1235.id === 82 || (_1235.id === undefined && _1235.type === "LParen"))) { c.idx++; _1234 = _1235; }
4522
+ else { if (c.track) { E(c, "LParen"); } _1234 = F; }
4523
+ if (_1234 === F) { c.idx = _1220; c.bindings = _1223; _1219 = F; break L_1221; }
4524
+ let _1237;
4525
+ const _1238 = c.idx;
4460
4526
  {
4461
-
4462
- const _1222 = c.ruleDepth;
4463
- if (c.track) { c.ruleNames[_1222] = "OrderByClause"; c.ruleDepth = _1222 + 1; }
4464
- const _1221 = R[6](c);
4465
- if (c.track) c.ruleDepth = _1222;
4466
- if (_1221 === F) { c.idx = _1220; _1219 = null; } else _1219 = _1221;
4467
- }
4468
- if (_1219 !== F) _1182["orderBy"] = _1219;
4469
- const _1218 = _1219;
4470
- if (_1218 === F) { c.idx = _1180; c.bindings = _1183; _1179 = F; break L_1181; }
4471
- let _1223;
4472
- const _1224 = c.tokens[c.idx];
4473
- if (_1224 !== undefined && (_1224.id === 81 || (_1224.id === undefined && _1224.type === "RParen"))) { c.idx++; _1223 = _1224; }
4474
- else { if (c.track) { E(c, "RParen"); } _1223 = F; }
4475
- if (_1223 === F) { c.idx = _1180; c.bindings = _1183; _1179 = F; break L_1181; }
4476
- let _1226;
4477
- const _1227 = c.idx;
4478
- {
4479
-
4480
- let _1228;
4481
- L_1229: {
4482
- const _1230 = c.idx;
4483
- let _1231;
4484
- const _1232 = c.tokens[c.idx];
4485
- if (_1232 !== undefined && (_1232.id === 55 || (_1232.id === undefined && _1232.type === "Filter"))) { c.idx++; _1231 = _1232; }
4486
- else { if (c.track) { E(c, "Filter"); } _1231 = F; }
4487
- if (_1231 === F) { c.idx = _1230; _1228 = F; break L_1229; }
4488
- let _1233;
4489
- const _1234 = c.tokens[c.idx];
4490
- if (_1234 !== undefined && (_1234.id === 80 || (_1234.id === undefined && _1234.type === "LParen"))) { c.idx++; _1233 = _1234; }
4491
- else { if (c.track) { E(c, "LParen"); } _1233 = F; }
4492
- if (_1233 === F) { c.idx = _1230; _1228 = F; break L_1229; }
4493
- let _1235;
4494
- const _1236 = c.tokens[c.idx];
4495
- if (_1236 !== undefined && (_1236.id === 5 || (_1236.id === undefined && _1236.type === "Where"))) { c.idx++; _1235 = _1236; }
4496
- else { if (c.track) { E(c, "Where"); } _1235 = F; }
4497
- if (_1235 === F) { c.idx = _1230; _1228 = F; break L_1229; }
4498
-
4499
- const _1238 = c.ruleDepth;
4500
- if (c.track) { c.ruleNames[_1238] = "Expression"; c.ruleDepth = _1238 + 1; }
4501
- const _1237 = R[19](c);
4502
- if (c.track) c.ruleDepth = _1238;
4503
- if (_1237 === F) { c.idx = _1230; _1228 = F; break L_1229; }
4504
4527
  let _1239;
4505
4528
  const _1240 = c.tokens[c.idx];
4506
- if (_1240 !== undefined && (_1240.id === 81 || (_1240.id === undefined && _1240.type === "RParen"))) { c.idx++; _1239 = _1240; }
4507
- else { if (c.track) { E(c, "RParen"); } _1239 = F; }
4508
- if (_1239 === F) { c.idx = _1230; _1228 = F; break L_1229; }
4509
- _1228 = _1237;
4510
- }
4511
- if (_1228 === F) { c.idx = _1227; _1226 = null; } else _1226 = _1228;
4529
+ if (_1240 !== undefined && (_1240.id === 7 || (_1240.id === undefined && _1240.type === "Distinct"))) { c.idx++; _1239 = _1240; }
4530
+ else { if (c.track) { E(c, "Distinct"); } _1239 = F; }
4531
+ if (_1239 === F) { c.idx = _1238; _1237 = false; } else _1237 = true;
4512
4532
  }
4513
- if (_1226 !== F) _1182["filter"] = _1226;
4514
- const _1225 = _1226;
4515
- if (_1225 === F) { c.idx = _1180; c.bindings = _1183; _1179 = F; break L_1181; }
4533
+ if (_1237 !== F) _1222["distinct"] = _1237;
4534
+ const _1236 = _1237;
4535
+ if (_1236 === F) { c.idx = _1220; c.bindings = _1223; _1219 = F; break L_1221; }
4516
4536
  let _1242;
4517
4537
  const _1243 = c.idx;
4518
4538
  {
4519
-
4520
4539
  let _1244;
4521
- L_1245: {
4522
- const _1246 = c.idx;
4523
- let _1247;
4524
- const _1248 = c.tokens[c.idx];
4525
- if (_1248 !== undefined && (_1248.id === 53 || (_1248.id === undefined && _1248.type === "Over"))) { c.idx++; _1247 = _1248; }
4526
- else { if (c.track) { E(c, "Over"); } _1247 = F; }
4527
- if (_1247 === F) { c.idx = _1246; _1244 = F; break L_1245; }
4528
-
4529
- const _1250 = c.ruleDepth;
4530
- if (c.track) { c.ruleNames[_1250] = "WindowSpec"; c.ruleDepth = _1250 + 1; }
4531
- const _1249 = R[58](c);
4532
- if (c.track) c.ruleDepth = _1250;
4533
- if (_1249 === F) { c.idx = _1246; _1244 = F; break L_1245; }
4534
- _1244 = _1249;
4535
- }
4536
- if (_1244 === F) { c.idx = _1243; _1242 = null; } else _1242 = _1244;
4537
- }
4538
- if (_1242 !== F) _1182["over"] = _1242;
4540
+ const _1245 = c.tokens[c.idx];
4541
+ if (_1245 !== undefined && (_1245.id === 79 || (_1245.id === undefined && _1245.type === "Star"))) { c.idx++; _1244 = _1245; }
4542
+ else { if (c.track) { E(c, "Star"); } _1244 = F; }
4543
+ if (_1244 === F) { c.idx = _1243; _1242 = false; } else _1242 = true;
4544
+ }
4545
+ if (_1242 !== F) _1222["star"] = _1242;
4539
4546
  const _1241 = _1242;
4540
- if (_1241 === F) { c.idx = _1180; c.bindings = _1183; _1179 = F; break L_1181; }
4541
- const _1251 = H[52](_1182, c);
4542
- c.bindings = _1183;
4543
- _1179 = _1251;
4547
+ if (_1241 === F) { c.idx = _1220; c.bindings = _1223; _1219 = F; break L_1221; }
4548
+
4549
+ let _1247 = [];
4550
+ L_1251: {
4551
+ const _1248 = c.idx;
4552
+
4553
+ const _1253 = c.ruleDepth;
4554
+ if (c.track) { c.ruleNames[_1253] = "Expression"; c.ruleDepth = _1253 + 1; }
4555
+ const _1252 = R[19](c);
4556
+ if (c.track) c.ruleDepth = _1253;
4557
+ if (_1252 === F) { c.idx = _1248; _1247 = []; break L_1251; }
4558
+ _1247.push(_1252);
4559
+ for (;;) {
4560
+ const _1249 = c.idx;
4561
+ let _1254;
4562
+ const _1255 = c.tokens[c.idx];
4563
+ if (_1255 !== undefined && (_1255.id === 86 || (_1255.id === undefined && _1255.type === "Comma"))) { c.idx++; _1254 = _1255; }
4564
+ else { if (c.track) { E(c, "Comma"); } _1254 = F; }
4565
+ if (_1254 === F) { c.idx = _1249; break; }
4566
+ const _1250 = c.idx;
4567
+
4568
+ const _1257 = c.ruleDepth;
4569
+ if (c.track) { c.ruleNames[_1257] = "Expression"; c.ruleDepth = _1257 + 1; }
4570
+ const _1256 = R[19](c);
4571
+ if (c.track) c.ruleDepth = _1257;
4572
+ if (_1256 === F) { c.idx = _1249; break; }
4573
+ _1247.push(_1256);
4574
+ }
4575
+ }
4576
+ if (_1247 !== F) _1222["args"] = _1247;
4577
+ const _1246 = _1247;
4578
+ if (_1246 === F) { c.idx = _1220; c.bindings = _1223; _1219 = F; break L_1221; }
4579
+ let _1259;
4580
+ const _1260 = c.idx;
4581
+ {
4582
+
4583
+ const _1262 = c.ruleDepth;
4584
+ if (c.track) { c.ruleNames[_1262] = "OrderByClause"; c.ruleDepth = _1262 + 1; }
4585
+ const _1261 = R[6](c);
4586
+ if (c.track) c.ruleDepth = _1262;
4587
+ if (_1261 === F) { c.idx = _1260; _1259 = null; } else _1259 = _1261;
4588
+ }
4589
+ if (_1259 !== F) _1222["orderBy"] = _1259;
4590
+ const _1258 = _1259;
4591
+ if (_1258 === F) { c.idx = _1220; c.bindings = _1223; _1219 = F; break L_1221; }
4592
+ let _1263;
4593
+ const _1264 = c.tokens[c.idx];
4594
+ if (_1264 !== undefined && (_1264.id === 83 || (_1264.id === undefined && _1264.type === "RParen"))) { c.idx++; _1263 = _1264; }
4595
+ else { if (c.track) { E(c, "RParen"); } _1263 = F; }
4596
+ if (_1263 === F) { c.idx = _1220; c.bindings = _1223; _1219 = F; break L_1221; }
4597
+ let _1266;
4598
+ const _1267 = c.idx;
4599
+ {
4600
+
4601
+ let _1268;
4602
+ L_1269: {
4603
+ const _1270 = c.idx;
4604
+ let _1271;
4605
+ const _1272 = c.tokens[c.idx];
4606
+ if (_1272 !== undefined && (_1272.id === 55 || (_1272.id === undefined && _1272.type === "Filter"))) { c.idx++; _1271 = _1272; }
4607
+ else { if (c.track) { E(c, "Filter"); } _1271 = F; }
4608
+ if (_1271 === F) { c.idx = _1270; _1268 = F; break L_1269; }
4609
+ let _1273;
4610
+ const _1274 = c.tokens[c.idx];
4611
+ if (_1274 !== undefined && (_1274.id === 82 || (_1274.id === undefined && _1274.type === "LParen"))) { c.idx++; _1273 = _1274; }
4612
+ else { if (c.track) { E(c, "LParen"); } _1273 = F; }
4613
+ if (_1273 === F) { c.idx = _1270; _1268 = F; break L_1269; }
4614
+ let _1275;
4615
+ const _1276 = c.tokens[c.idx];
4616
+ if (_1276 !== undefined && (_1276.id === 5 || (_1276.id === undefined && _1276.type === "Where"))) { c.idx++; _1275 = _1276; }
4617
+ else { if (c.track) { E(c, "Where"); } _1275 = F; }
4618
+ if (_1275 === F) { c.idx = _1270; _1268 = F; break L_1269; }
4619
+
4620
+ const _1278 = c.ruleDepth;
4621
+ if (c.track) { c.ruleNames[_1278] = "Expression"; c.ruleDepth = _1278 + 1; }
4622
+ const _1277 = R[19](c);
4623
+ if (c.track) c.ruleDepth = _1278;
4624
+ if (_1277 === F) { c.idx = _1270; _1268 = F; break L_1269; }
4625
+ let _1279;
4626
+ const _1280 = c.tokens[c.idx];
4627
+ if (_1280 !== undefined && (_1280.id === 83 || (_1280.id === undefined && _1280.type === "RParen"))) { c.idx++; _1279 = _1280; }
4628
+ else { if (c.track) { E(c, "RParen"); } _1279 = F; }
4629
+ if (_1279 === F) { c.idx = _1270; _1268 = F; break L_1269; }
4630
+ _1268 = _1277;
4631
+ }
4632
+ if (_1268 === F) { c.idx = _1267; _1266 = null; } else _1266 = _1268;
4633
+ }
4634
+ if (_1266 !== F) _1222["filter"] = _1266;
4635
+ const _1265 = _1266;
4636
+ if (_1265 === F) { c.idx = _1220; c.bindings = _1223; _1219 = F; break L_1221; }
4637
+ let _1282;
4638
+ const _1283 = c.idx;
4639
+ {
4640
+
4641
+ let _1284;
4642
+ L_1285: {
4643
+ const _1286 = c.idx;
4644
+ let _1287;
4645
+ const _1288 = c.tokens[c.idx];
4646
+ if (_1288 !== undefined && (_1288.id === 53 || (_1288.id === undefined && _1288.type === "Over"))) { c.idx++; _1287 = _1288; }
4647
+ else { if (c.track) { E(c, "Over"); } _1287 = F; }
4648
+ if (_1287 === F) { c.idx = _1286; _1284 = F; break L_1285; }
4649
+
4650
+ const _1290 = c.ruleDepth;
4651
+ if (c.track) { c.ruleNames[_1290] = "WindowSpec"; c.ruleDepth = _1290 + 1; }
4652
+ const _1289 = R[59](c);
4653
+ if (c.track) c.ruleDepth = _1290;
4654
+ if (_1289 === F) { c.idx = _1286; _1284 = F; break L_1285; }
4655
+ _1284 = _1289;
4656
+ }
4657
+ if (_1284 === F) { c.idx = _1283; _1282 = null; } else _1282 = _1284;
4658
+ }
4659
+ if (_1282 !== F) _1222["over"] = _1282;
4660
+ const _1281 = _1282;
4661
+ if (_1281 === F) { c.idx = _1220; c.bindings = _1223; _1219 = F; break L_1221; }
4662
+ const _1291 = H[53](_1222, c);
4663
+ c.bindings = _1223;
4664
+ _1219 = _1291;
4544
4665
  }
4545
- return _1179;
4666
+ return _1219;
4546
4667
  }
4547
4668
 
4548
4669
  // ColumnRef
4549
- R[53] = (c) => {
4670
+ R[54] = (c) => {
4550
4671
 
4551
- const _1255 = c.ruleDepth;
4552
- if (c.track) { c.ruleNames[_1255] = "PathSegments"; c.ruleDepth = _1255 + 1; }
4553
- const _1254 = R[8](c);
4554
- if (c.track) c.ruleDepth = _1255;
4555
- const _1253 = _1254 === F ? F : H[53](_1254, c);
4556
- return _1253;
4672
+ const _1295 = c.ruleDepth;
4673
+ if (c.track) { c.ruleNames[_1295] = "PathSegments"; c.ruleDepth = _1295 + 1; }
4674
+ const _1294 = R[8](c);
4675
+ if (c.track) c.ruleDepth = _1295;
4676
+ const _1293 = _1294 === F ? F : H[54](_1294, c);
4677
+ return _1293;
4557
4678
  }
4558
4679
 
4559
4680
  // Param
4560
- R[54] = (c) => {
4561
-
4562
- let _1256;
4563
- L_1257: {
4564
- const _1258 = c.tokens[c.idx];
4565
- if (_1258 === undefined) { if (c.track) { E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _1256 = F; break L_1257; }
4566
- const _1259 = _1258.id !== undefined ? _1258.id : I[_1258.type];
4567
- switch (_1259) {
4568
- case 87: {
4681
+ R[55] = (c) => {
4569
4682
 
4570
- let _1260;
4571
- L_1262: {
4572
- const _1261 = c.idx;
4573
- const _1264 = c.bindings;
4574
- const _1263 = {};
4575
- c.bindings = _1263;
4576
- let _1265;
4577
- const _1266 = c.tokens[c.idx];
4578
- if (_1266 !== undefined && (_1266.id === 87 || (_1266.id === undefined && _1266.type === "QMark"))) { c.idx++; _1265 = _1266; }
4579
- else { if (c.track) { E(c, "QMark"); } _1265 = F; }
4580
- if (_1265 === F) { c.idx = _1261; c.bindings = _1264; _1260 = F; break L_1262; }
4581
- const _1267 = H[54](_1263, c);
4582
- c.bindings = _1264;
4583
- _1260 = _1267;
4584
- }
4585
- _1256 = _1260; break L_1257;
4683
+ let _1296;
4684
+ L_1297: {
4685
+ const _1298 = c.tokens[c.idx];
4686
+ if (_1298 === undefined) { if (c.track) { E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _1296 = F; break L_1297; }
4687
+ const _1299 = _1298.id !== undefined ? _1298.id : I[_1298.type];
4688
+ switch (_1299) {
4689
+ case 89: {
4690
+
4691
+ let _1300;
4692
+ L_1302: {
4693
+ const _1301 = c.idx;
4694
+ const _1304 = c.bindings;
4695
+ const _1303 = {};
4696
+ c.bindings = _1303;
4697
+ let _1305;
4698
+ const _1306 = c.tokens[c.idx];
4699
+ if (_1306 !== undefined && (_1306.id === 89 || (_1306.id === undefined && _1306.type === "QMark"))) { c.idx++; _1305 = _1306; }
4700
+ else { if (c.track) { E(c, "QMark"); } _1305 = F; }
4701
+ if (_1305 === F) { c.idx = _1301; c.bindings = _1304; _1300 = F; break L_1302; }
4702
+ const _1307 = H[55](_1303, c);
4703
+ c.bindings = _1304;
4704
+ _1300 = _1307;
4705
+ }
4706
+ _1296 = _1300; break L_1297;
4586
4707
  }
4587
- case 61: {
4588
- let _1269;
4589
- const _1270 = c.tokens[c.idx];
4590
- if (_1270 !== undefined && (_1270.id === 61 || (_1270.id === undefined && _1270.type === "DollarParam"))) { c.idx++; _1269 = _1270; }
4591
- else { if (c.track) { E(c, "DollarParam"); } _1269 = F; }
4592
- const _1268 = _1269 === F ? F : H[55](_1269, c);
4593
- _1256 = _1268; break L_1257;
4708
+ case 63: {
4709
+ let _1309;
4710
+ const _1310 = c.tokens[c.idx];
4711
+ if (_1310 !== undefined && (_1310.id === 63 || (_1310.id === undefined && _1310.type === "DollarParam"))) { c.idx++; _1309 = _1310; }
4712
+ else { if (c.track) { E(c, "DollarParam"); } _1309 = F; }
4713
+ const _1308 = _1309 === F ? F : H[56](_1309, c);
4714
+ _1296 = _1308; break L_1297;
4594
4715
  }
4595
- case 65: {
4596
- let _1272;
4597
- const _1273 = c.tokens[c.idx];
4598
- if (_1273 !== undefined && (_1273.id === 65 || (_1273.id === undefined && _1273.type === "NamedParam"))) { c.idx++; _1272 = _1273; }
4599
- else { if (c.track) { E(c, "NamedParam"); } _1272 = F; }
4600
- const _1271 = _1272 === F ? F : H[56](_1272, c);
4601
- _1256 = _1271; break L_1257;
4716
+ case 67: {
4717
+ let _1312;
4718
+ const _1313 = c.tokens[c.idx];
4719
+ if (_1313 !== undefined && (_1313.id === 67 || (_1313.id === undefined && _1313.type === "NamedParam"))) { c.idx++; _1312 = _1313; }
4720
+ else { if (c.track) { E(c, "NamedParam"); } _1312 = F; }
4721
+ const _1311 = _1312 === F ? F : H[57](_1312, c);
4722
+ _1296 = _1311; break L_1297;
4602
4723
  }
4603
- default: { if (c.track) { E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _1256 = F; break L_1257; }
4724
+ default: { if (c.track) { E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _1296 = F; break L_1297; }
4604
4725
  }
4605
4726
  }
4606
- return _1256;
4727
+ return _1296;
4607
4728
  }
4608
4729
 
4609
4730
  // ConcatExpr
4610
- R[55] = (c) => c.track ? R[59](c) : R[21](c, 0)
4731
+ R[56] = (c) => c.track ? R[60](c) : R[21](c, 0)
4611
4732
 
4612
4733
  // PredicateTail
4613
- R[56] = (c) => {
4734
+ R[57] = (c) => {
4614
4735
 
4615
- let _1274;
4616
- L_1275: {
4617
- const _1276 = c.tokens[c.idx];
4618
- if (_1276 === undefined) { if (c.track) { E(c, "Eq"); E(c, "EqEq"); E(c, "NotEq"); E(c, "BangEq"); E(c, "LtEq"); E(c, "GtEq"); E(c, "Lt"); E(c, "Gt"); E(c, "Not"); E(c, "In"); E(c, "Between"); E(c, "Like"); E(c, "Ilike"); E(c, "Is"); } _1274 = F; break L_1275; }
4619
- const _1277 = _1276.id !== undefined ? _1276.id : I[_1276.type];
4620
- switch (_1277) {
4621
- case 74: case 71: case 67: case 70: case 68: case 69: case 72: case 73: {
4622
-
4623
- let _1278;
4624
- L_1280: {
4625
- const _1279 = c.idx;
4626
- const _1282 = c.bindings;
4627
- const _1281 = {};
4628
- c.bindings = _1281;
4736
+ let _1314;
4737
+ L_1315: {
4738
+ const _1316 = c.tokens[c.idx];
4739
+ if (_1316 === undefined) { if (c.track) { E(c, "Eq"); E(c, "EqEq"); E(c, "NotEq"); E(c, "BangEq"); E(c, "LtEq"); E(c, "GtEq"); E(c, "Lt"); E(c, "Gt"); E(c, "Not"); E(c, "In"); E(c, "Between"); E(c, "Like"); E(c, "Ilike"); E(c, "Is"); } _1314 = F; break L_1315; }
4740
+ const _1317 = _1316.id !== undefined ? _1316.id : I[_1316.type];
4741
+ switch (_1317) {
4742
+ case 76: case 73: case 69: case 72: case 70: case 71: case 74: case 75: {
4629
4743
 
4630
- let _1284;
4631
- L_1285: {
4632
- const _1286 = c.tokens[c.idx];
4633
- if (_1286 === undefined) { if (c.track) { E(c, "Eq"); E(c, "EqEq"); E(c, "NotEq"); E(c, "BangEq"); E(c, "LtEq"); E(c, "GtEq"); E(c, "Lt"); E(c, "Gt"); } _1284 = F; break L_1285; }
4634
- const _1287 = _1286.id !== undefined ? _1286.id : I[_1286.type];
4635
- switch (_1287) {
4636
- case 74: {
4744
+ let _1318;
4745
+ L_1320: {
4746
+ const _1319 = c.idx;
4747
+ const _1322 = c.bindings;
4748
+ const _1321 = {};
4749
+ c.bindings = _1321;
4750
+
4751
+ let _1324;
4752
+ L_1325: {
4753
+ const _1326 = c.tokens[c.idx];
4754
+ if (_1326 === undefined) { if (c.track) { E(c, "Eq"); E(c, "EqEq"); E(c, "NotEq"); E(c, "BangEq"); E(c, "LtEq"); E(c, "GtEq"); E(c, "Lt"); E(c, "Gt"); } _1324 = F; break L_1325; }
4755
+ const _1327 = _1326.id !== undefined ? _1326.id : I[_1326.type];
4756
+ switch (_1327) {
4757
+ case 76: {
4637
4758
 
4638
- let _1288;
4639
- L_1289: {
4640
- const _1290 = c.idx;
4641
- let _1291;
4642
- const _1292 = c.tokens[c.idx];
4643
- if (_1292 !== undefined && (_1292.id === 74 || (_1292.id === undefined && _1292.type === "Eq"))) { c.idx++; _1291 = _1292; }
4644
- else { if (c.track) { E(c, "Eq"); } _1291 = F; }
4645
- if (_1291 === F) { c.idx = _1290; _1288 = F; break L_1289; }
4646
- _1288 = "EQ";
4759
+ let _1328;
4760
+ L_1329: {
4761
+ const _1330 = c.idx;
4762
+ let _1331;
4763
+ const _1332 = c.tokens[c.idx];
4764
+ if (_1332 !== undefined && (_1332.id === 76 || (_1332.id === undefined && _1332.type === "Eq"))) { c.idx++; _1331 = _1332; }
4765
+ else { if (c.track) { E(c, "Eq"); } _1331 = F; }
4766
+ if (_1331 === F) { c.idx = _1330; _1328 = F; break L_1329; }
4767
+ _1328 = "EQ";
4647
4768
  }
4648
- _1284 = _1288; break L_1285;
4769
+ _1324 = _1328; break L_1325;
4649
4770
  }
4650
- case 71: {
4771
+ case 73: {
4651
4772
 
4652
- let _1293;
4653
- L_1294: {
4654
- const _1295 = c.idx;
4655
- let _1296;
4656
- const _1297 = c.tokens[c.idx];
4657
- if (_1297 !== undefined && (_1297.id === 71 || (_1297.id === undefined && _1297.type === "EqEq"))) { c.idx++; _1296 = _1297; }
4658
- else { if (c.track) { E(c, "EqEq"); } _1296 = F; }
4659
- if (_1296 === F) { c.idx = _1295; _1293 = F; break L_1294; }
4660
- _1293 = "EQ";
4773
+ let _1333;
4774
+ L_1334: {
4775
+ const _1335 = c.idx;
4776
+ let _1336;
4777
+ const _1337 = c.tokens[c.idx];
4778
+ if (_1337 !== undefined && (_1337.id === 73 || (_1337.id === undefined && _1337.type === "EqEq"))) { c.idx++; _1336 = _1337; }
4779
+ else { if (c.track) { E(c, "EqEq"); } _1336 = F; }
4780
+ if (_1336 === F) { c.idx = _1335; _1333 = F; break L_1334; }
4781
+ _1333 = "EQ";
4661
4782
  }
4662
- _1284 = _1293; break L_1285;
4783
+ _1324 = _1333; break L_1325;
4663
4784
  }
4664
- case 67: {
4785
+ case 69: {
4665
4786
 
4666
- let _1298;
4667
- L_1299: {
4668
- const _1300 = c.idx;
4669
- let _1301;
4670
- const _1302 = c.tokens[c.idx];
4671
- if (_1302 !== undefined && (_1302.id === 67 || (_1302.id === undefined && _1302.type === "NotEq"))) { c.idx++; _1301 = _1302; }
4672
- else { if (c.track) { E(c, "NotEq"); } _1301 = F; }
4673
- if (_1301 === F) { c.idx = _1300; _1298 = F; break L_1299; }
4674
- _1298 = "NE";
4787
+ let _1338;
4788
+ L_1339: {
4789
+ const _1340 = c.idx;
4790
+ let _1341;
4791
+ const _1342 = c.tokens[c.idx];
4792
+ if (_1342 !== undefined && (_1342.id === 69 || (_1342.id === undefined && _1342.type === "NotEq"))) { c.idx++; _1341 = _1342; }
4793
+ else { if (c.track) { E(c, "NotEq"); } _1341 = F; }
4794
+ if (_1341 === F) { c.idx = _1340; _1338 = F; break L_1339; }
4795
+ _1338 = "NE";
4675
4796
  }
4676
- _1284 = _1298; break L_1285;
4797
+ _1324 = _1338; break L_1325;
4677
4798
  }
4678
- case 70: {
4799
+ case 72: {
4679
4800
 
4680
- let _1303;
4681
- L_1304: {
4682
- const _1305 = c.idx;
4683
- let _1306;
4684
- const _1307 = c.tokens[c.idx];
4685
- if (_1307 !== undefined && (_1307.id === 70 || (_1307.id === undefined && _1307.type === "BangEq"))) { c.idx++; _1306 = _1307; }
4686
- else { if (c.track) { E(c, "BangEq"); } _1306 = F; }
4687
- if (_1306 === F) { c.idx = _1305; _1303 = F; break L_1304; }
4688
- _1303 = "NE";
4801
+ let _1343;
4802
+ L_1344: {
4803
+ const _1345 = c.idx;
4804
+ let _1346;
4805
+ const _1347 = c.tokens[c.idx];
4806
+ if (_1347 !== undefined && (_1347.id === 72 || (_1347.id === undefined && _1347.type === "BangEq"))) { c.idx++; _1346 = _1347; }
4807
+ else { if (c.track) { E(c, "BangEq"); } _1346 = F; }
4808
+ if (_1346 === F) { c.idx = _1345; _1343 = F; break L_1344; }
4809
+ _1343 = "NE";
4689
4810
  }
4690
- _1284 = _1303; break L_1285;
4811
+ _1324 = _1343; break L_1325;
4691
4812
  }
4692
- case 68: {
4813
+ case 70: {
4693
4814
 
4694
- let _1308;
4695
- L_1309: {
4696
- const _1310 = c.idx;
4697
- let _1311;
4698
- const _1312 = c.tokens[c.idx];
4699
- if (_1312 !== undefined && (_1312.id === 68 || (_1312.id === undefined && _1312.type === "LtEq"))) { c.idx++; _1311 = _1312; }
4700
- else { if (c.track) { E(c, "LtEq"); } _1311 = F; }
4701
- if (_1311 === F) { c.idx = _1310; _1308 = F; break L_1309; }
4702
- _1308 = "LE";
4815
+ let _1348;
4816
+ L_1349: {
4817
+ const _1350 = c.idx;
4818
+ let _1351;
4819
+ const _1352 = c.tokens[c.idx];
4820
+ if (_1352 !== undefined && (_1352.id === 70 || (_1352.id === undefined && _1352.type === "LtEq"))) { c.idx++; _1351 = _1352; }
4821
+ else { if (c.track) { E(c, "LtEq"); } _1351 = F; }
4822
+ if (_1351 === F) { c.idx = _1350; _1348 = F; break L_1349; }
4823
+ _1348 = "LE";
4703
4824
  }
4704
- _1284 = _1308; break L_1285;
4825
+ _1324 = _1348; break L_1325;
4705
4826
  }
4706
- case 69: {
4827
+ case 71: {
4707
4828
 
4708
- let _1313;
4709
- L_1314: {
4710
- const _1315 = c.idx;
4711
- let _1316;
4712
- const _1317 = c.tokens[c.idx];
4713
- if (_1317 !== undefined && (_1317.id === 69 || (_1317.id === undefined && _1317.type === "GtEq"))) { c.idx++; _1316 = _1317; }
4714
- else { if (c.track) { E(c, "GtEq"); } _1316 = F; }
4715
- if (_1316 === F) { c.idx = _1315; _1313 = F; break L_1314; }
4716
- _1313 = "GE";
4829
+ let _1353;
4830
+ L_1354: {
4831
+ const _1355 = c.idx;
4832
+ let _1356;
4833
+ const _1357 = c.tokens[c.idx];
4834
+ if (_1357 !== undefined && (_1357.id === 71 || (_1357.id === undefined && _1357.type === "GtEq"))) { c.idx++; _1356 = _1357; }
4835
+ else { if (c.track) { E(c, "GtEq"); } _1356 = F; }
4836
+ if (_1356 === F) { c.idx = _1355; _1353 = F; break L_1354; }
4837
+ _1353 = "GE";
4717
4838
  }
4718
- _1284 = _1313; break L_1285;
4839
+ _1324 = _1353; break L_1325;
4719
4840
  }
4720
- case 72: {
4841
+ case 74: {
4721
4842
 
4722
- let _1318;
4723
- L_1319: {
4724
- const _1320 = c.idx;
4725
- let _1321;
4726
- const _1322 = c.tokens[c.idx];
4727
- if (_1322 !== undefined && (_1322.id === 72 || (_1322.id === undefined && _1322.type === "Lt"))) { c.idx++; _1321 = _1322; }
4728
- else { if (c.track) { E(c, "Lt"); } _1321 = F; }
4729
- if (_1321 === F) { c.idx = _1320; _1318 = F; break L_1319; }
4730
- _1318 = "LT";
4843
+ let _1358;
4844
+ L_1359: {
4845
+ const _1360 = c.idx;
4846
+ let _1361;
4847
+ const _1362 = c.tokens[c.idx];
4848
+ if (_1362 !== undefined && (_1362.id === 74 || (_1362.id === undefined && _1362.type === "Lt"))) { c.idx++; _1361 = _1362; }
4849
+ else { if (c.track) { E(c, "Lt"); } _1361 = F; }
4850
+ if (_1361 === F) { c.idx = _1360; _1358 = F; break L_1359; }
4851
+ _1358 = "LT";
4731
4852
  }
4732
- _1284 = _1318; break L_1285;
4853
+ _1324 = _1358; break L_1325;
4733
4854
  }
4734
- case 73: {
4855
+ case 75: {
4735
4856
 
4736
- let _1323;
4737
- L_1324: {
4738
- const _1325 = c.idx;
4739
- let _1326;
4740
- const _1327 = c.tokens[c.idx];
4741
- if (_1327 !== undefined && (_1327.id === 73 || (_1327.id === undefined && _1327.type === "Gt"))) { c.idx++; _1326 = _1327; }
4742
- else { if (c.track) { E(c, "Gt"); } _1326 = F; }
4743
- if (_1326 === F) { c.idx = _1325; _1323 = F; break L_1324; }
4744
- _1323 = "GT";
4857
+ let _1363;
4858
+ L_1364: {
4859
+ const _1365 = c.idx;
4860
+ let _1366;
4861
+ const _1367 = c.tokens[c.idx];
4862
+ if (_1367 !== undefined && (_1367.id === 75 || (_1367.id === undefined && _1367.type === "Gt"))) { c.idx++; _1366 = _1367; }
4863
+ else { if (c.track) { E(c, "Gt"); } _1366 = F; }
4864
+ if (_1366 === F) { c.idx = _1365; _1363 = F; break L_1364; }
4865
+ _1363 = "GT";
4745
4866
  }
4746
- _1284 = _1323; break L_1285;
4867
+ _1324 = _1363; break L_1325;
4747
4868
  }
4748
- default: { if (c.track) { E(c, "Eq"); E(c, "EqEq"); E(c, "NotEq"); E(c, "BangEq"); E(c, "LtEq"); E(c, "GtEq"); E(c, "Lt"); E(c, "Gt"); } _1284 = F; break L_1285; }
4869
+ default: { if (c.track) { E(c, "Eq"); E(c, "EqEq"); E(c, "NotEq"); E(c, "BangEq"); E(c, "LtEq"); E(c, "GtEq"); E(c, "Lt"); E(c, "Gt"); } _1324 = F; break L_1325; }
4749
4870
  }
4750
4871
  }
4751
- if (_1284 !== F) _1281["op"] = _1284;
4752
- const _1283 = _1284;
4753
- if (_1283 === F) { c.idx = _1279; c.bindings = _1282; _1278 = F; break L_1280; }
4872
+ if (_1324 !== F) _1321["op"] = _1324;
4873
+ const _1323 = _1324;
4874
+ if (_1323 === F) { c.idx = _1319; c.bindings = _1322; _1318 = F; break L_1320; }
4754
4875
 
4755
- const _1330 = c.ruleDepth;
4756
- if (c.track) { c.ruleNames[_1330] = "ConcatExpr"; c.ruleDepth = _1330 + 1; }
4757
- const _1329 = R[55](c);
4758
- if (c.track) c.ruleDepth = _1330;
4759
- if (_1329 !== F) _1281["right"] = _1329;
4760
- const _1328 = _1329;
4761
- if (_1328 === F) { c.idx = _1279; c.bindings = _1282; _1278 = F; break L_1280; }
4762
- const _1331 = H[57](_1281, c);
4763
- c.bindings = _1282;
4764
- _1278 = _1331;
4876
+ const _1370 = c.ruleDepth;
4877
+ if (c.track) { c.ruleNames[_1370] = "ConcatExpr"; c.ruleDepth = _1370 + 1; }
4878
+ const _1369 = R[56](c);
4879
+ if (c.track) c.ruleDepth = _1370;
4880
+ if (_1369 !== F) _1321["right"] = _1369;
4881
+ const _1368 = _1369;
4882
+ if (_1368 === F) { c.idx = _1319; c.bindings = _1322; _1318 = F; break L_1320; }
4883
+ const _1371 = H[58](_1321, c);
4884
+ c.bindings = _1322;
4885
+ _1318 = _1371;
4765
4886
  }
4766
- _1274 = _1278; break L_1275;
4887
+ _1314 = _1318; break L_1315;
4767
4888
  }
4768
4889
  case 11: case 12: case 17: case 15: case 16: {
4769
4890
 
4770
- let _1332;
4771
- L_1334: {
4772
- const _1333 = c.idx;
4773
- const _1336 = c.bindings;
4774
- const _1335 = {};
4775
- c.bindings = _1335;
4776
- let _1338;
4777
- const _1339 = c.idx;
4891
+ let _1372;
4892
+ L_1374: {
4893
+ const _1373 = c.idx;
4894
+ const _1376 = c.bindings;
4895
+ const _1375 = {};
4896
+ c.bindings = _1375;
4897
+ let _1378;
4898
+ const _1379 = c.idx;
4778
4899
  {
4779
- let _1340;
4780
- const _1341 = c.tokens[c.idx];
4781
- if (_1341 !== undefined && (_1341.id === 11 || (_1341.id === undefined && _1341.type === "Not"))) { c.idx++; _1340 = _1341; }
4782
- else { if (c.track) { E(c, "Not"); } _1340 = F; }
4783
- if (_1340 === F) { c.idx = _1339; _1338 = false; } else _1338 = true;
4784
- }
4785
- if (_1338 !== F) _1335["negated"] = _1338;
4786
- const _1337 = _1338;
4787
- if (_1337 === F) { c.idx = _1333; c.bindings = _1336; _1332 = F; break L_1334; }
4788
-
4789
- let _1343;
4790
- L_1344: {
4791
- const _1345 = c.tokens[c.idx];
4792
- if (_1345 === undefined) { if (c.track) { E(c, "In"); E(c, "Between"); E(c, "Like"); E(c, "Ilike"); } _1343 = F; break L_1344; }
4793
- const _1346 = _1345.id !== undefined ? _1345.id : I[_1345.type];
4794
- switch (_1346) {
4900
+ let _1380;
4901
+ const _1381 = c.tokens[c.idx];
4902
+ if (_1381 !== undefined && (_1381.id === 11 || (_1381.id === undefined && _1381.type === "Not"))) { c.idx++; _1380 = _1381; }
4903
+ else { if (c.track) { E(c, "Not"); } _1380 = F; }
4904
+ if (_1380 === F) { c.idx = _1379; _1378 = false; } else _1378 = true;
4905
+ }
4906
+ if (_1378 !== F) _1375["negated"] = _1378;
4907
+ const _1377 = _1378;
4908
+ if (_1377 === F) { c.idx = _1373; c.bindings = _1376; _1372 = F; break L_1374; }
4909
+
4910
+ let _1383;
4911
+ L_1384: {
4912
+ const _1385 = c.tokens[c.idx];
4913
+ if (_1385 === undefined) { if (c.track) { E(c, "In"); E(c, "Between"); E(c, "Like"); E(c, "Ilike"); } _1383 = F; break L_1384; }
4914
+ const _1386 = _1385.id !== undefined ? _1385.id : I[_1385.type];
4915
+ switch (_1386) {
4795
4916
  case 12: {
4796
4917
 
4797
- const _1348 = c.ruleDepth;
4798
- if (c.track) { c.ruleNames[_1348] = "InTail"; c.ruleDepth = _1348 + 1; }
4799
- const _1347 = R[60](c);
4800
- if (c.track) c.ruleDepth = _1348;
4801
- _1343 = _1347; break L_1344;
4918
+ const _1388 = c.ruleDepth;
4919
+ if (c.track) { c.ruleNames[_1388] = "InTail"; c.ruleDepth = _1388 + 1; }
4920
+ const _1387 = R[61](c);
4921
+ if (c.track) c.ruleDepth = _1388;
4922
+ _1383 = _1387; break L_1384;
4802
4923
  }
4803
4924
  case 17: {
4804
4925
 
4805
- const _1350 = c.ruleDepth;
4806
- if (c.track) { c.ruleNames[_1350] = "BetweenTail"; c.ruleDepth = _1350 + 1; }
4807
- const _1349 = R[61](c);
4808
- if (c.track) c.ruleDepth = _1350;
4809
- _1343 = _1349; break L_1344;
4926
+ const _1390 = c.ruleDepth;
4927
+ if (c.track) { c.ruleNames[_1390] = "BetweenTail"; c.ruleDepth = _1390 + 1; }
4928
+ const _1389 = R[62](c);
4929
+ if (c.track) c.ruleDepth = _1390;
4930
+ _1383 = _1389; break L_1384;
4810
4931
  }
4811
4932
  case 15: case 16: {
4812
4933
 
4813
- const _1352 = c.ruleDepth;
4814
- if (c.track) { c.ruleNames[_1352] = "LikeTail"; c.ruleDepth = _1352 + 1; }
4815
- const _1351 = R[62](c);
4816
- if (c.track) c.ruleDepth = _1352;
4817
- _1343 = _1351; break L_1344;
4934
+ const _1392 = c.ruleDepth;
4935
+ if (c.track) { c.ruleNames[_1392] = "LikeTail"; c.ruleDepth = _1392 + 1; }
4936
+ const _1391 = R[63](c);
4937
+ if (c.track) c.ruleDepth = _1392;
4938
+ _1383 = _1391; break L_1384;
4818
4939
  }
4819
- default: { if (c.track) { E(c, "In"); E(c, "Between"); E(c, "Like"); E(c, "Ilike"); } _1343 = F; break L_1344; }
4940
+ default: { if (c.track) { E(c, "In"); E(c, "Between"); E(c, "Like"); E(c, "Ilike"); } _1383 = F; break L_1384; }
4820
4941
  }
4821
4942
  }
4822
- if (_1343 !== F) _1335["t"] = _1343;
4823
- const _1342 = _1343;
4824
- if (_1342 === F) { c.idx = _1333; c.bindings = _1336; _1332 = F; break L_1334; }
4825
- const _1353 = H[58](_1335, c);
4826
- c.bindings = _1336;
4827
- _1332 = _1353;
4943
+ if (_1383 !== F) _1375["t"] = _1383;
4944
+ const _1382 = _1383;
4945
+ if (_1382 === F) { c.idx = _1373; c.bindings = _1376; _1372 = F; break L_1374; }
4946
+ const _1393 = H[59](_1375, c);
4947
+ c.bindings = _1376;
4948
+ _1372 = _1393;
4828
4949
  }
4829
- _1274 = _1332; break L_1275;
4950
+ _1314 = _1372; break L_1315;
4830
4951
  }
4831
4952
  case 13: {
4832
4953
 
4833
- let _1354;
4834
- L_1356: {
4835
- const _1355 = c.idx;
4836
- const _1358 = c.bindings;
4837
- const _1357 = {};
4838
- c.bindings = _1357;
4839
- let _1359;
4840
- const _1360 = c.tokens[c.idx];
4841
- if (_1360 !== undefined && (_1360.id === 13 || (_1360.id === undefined && _1360.type === "Is"))) { c.idx++; _1359 = _1360; }
4842
- else { if (c.track) { E(c, "Is"); } _1359 = F; }
4843
- if (_1359 === F) { c.idx = _1355; c.bindings = _1358; _1354 = F; break L_1356; }
4844
- let _1362;
4845
- const _1363 = c.idx;
4954
+ let _1394;
4955
+ L_1396: {
4956
+ const _1395 = c.idx;
4957
+ const _1398 = c.bindings;
4958
+ const _1397 = {};
4959
+ c.bindings = _1397;
4960
+ let _1399;
4961
+ const _1400 = c.tokens[c.idx];
4962
+ if (_1400 !== undefined && (_1400.id === 13 || (_1400.id === undefined && _1400.type === "Is"))) { c.idx++; _1399 = _1400; }
4963
+ else { if (c.track) { E(c, "Is"); } _1399 = F; }
4964
+ if (_1399 === F) { c.idx = _1395; c.bindings = _1398; _1394 = F; break L_1396; }
4965
+ let _1402;
4966
+ const _1403 = c.idx;
4846
4967
  {
4847
- let _1364;
4848
- const _1365 = c.tokens[c.idx];
4849
- if (_1365 !== undefined && (_1365.id === 11 || (_1365.id === undefined && _1365.type === "Not"))) { c.idx++; _1364 = _1365; }
4850
- else { if (c.track) { E(c, "Not"); } _1364 = F; }
4851
- if (_1364 === F) { c.idx = _1363; _1362 = false; } else _1362 = true;
4852
- }
4853
- if (_1362 !== F) _1357["negated"] = _1362;
4854
- const _1361 = _1362;
4855
- if (_1361 === F) { c.idx = _1355; c.bindings = _1358; _1354 = F; break L_1356; }
4856
-
4857
- let _1367;
4858
- L_1368: {
4859
- const _1369 = c.tokens[c.idx];
4860
- if (_1369 === undefined) { if (c.track) { E(c, "Null"); E(c, "True"); E(c, "False"); E(c, "Distinct"); } _1367 = F; break L_1368; }
4861
- const _1370 = _1369.id !== undefined ? _1369.id : I[_1369.type];
4862
- switch (_1370) {
4968
+ let _1404;
4969
+ const _1405 = c.tokens[c.idx];
4970
+ if (_1405 !== undefined && (_1405.id === 11 || (_1405.id === undefined && _1405.type === "Not"))) { c.idx++; _1404 = _1405; }
4971
+ else { if (c.track) { E(c, "Not"); } _1404 = F; }
4972
+ if (_1404 === F) { c.idx = _1403; _1402 = false; } else _1402 = true;
4973
+ }
4974
+ if (_1402 !== F) _1397["negated"] = _1402;
4975
+ const _1401 = _1402;
4976
+ if (_1401 === F) { c.idx = _1395; c.bindings = _1398; _1394 = F; break L_1396; }
4977
+
4978
+ let _1407;
4979
+ L_1408: {
4980
+ const _1409 = c.tokens[c.idx];
4981
+ if (_1409 === undefined) { if (c.track) { E(c, "Null"); E(c, "True"); E(c, "False"); E(c, "Distinct"); } _1407 = F; break L_1408; }
4982
+ const _1410 = _1409.id !== undefined ? _1409.id : I[_1409.type];
4983
+ switch (_1410) {
4863
4984
  case 14: {
4864
4985
 
4865
- let _1371;
4866
- L_1373: {
4867
- const _1372 = c.idx;
4868
- const _1375 = c.bindings;
4869
- const _1374 = {};
4870
- c.bindings = _1374;
4871
- let _1376;
4872
- const _1377 = c.tokens[c.idx];
4873
- if (_1377 !== undefined && (_1377.id === 14 || (_1377.id === undefined && _1377.type === "Null"))) { c.idx++; _1376 = _1377; }
4874
- else { if (c.track) { E(c, "Null"); } _1376 = F; }
4875
- if (_1376 === F) { c.idx = _1372; c.bindings = _1375; _1371 = F; break L_1373; }
4876
- const _1378 = H[59](_1374, c);
4877
- c.bindings = _1375;
4878
- _1371 = _1378;
4879
- }
4880
- _1367 = _1371; break L_1368;
4986
+ let _1411;
4987
+ L_1413: {
4988
+ const _1412 = c.idx;
4989
+ const _1415 = c.bindings;
4990
+ const _1414 = {};
4991
+ c.bindings = _1414;
4992
+ let _1416;
4993
+ const _1417 = c.tokens[c.idx];
4994
+ if (_1417 !== undefined && (_1417.id === 14 || (_1417.id === undefined && _1417.type === "Null"))) { c.idx++; _1416 = _1417; }
4995
+ else { if (c.track) { E(c, "Null"); } _1416 = F; }
4996
+ if (_1416 === F) { c.idx = _1412; c.bindings = _1415; _1411 = F; break L_1413; }
4997
+ const _1418 = H[60](_1414, c);
4998
+ c.bindings = _1415;
4999
+ _1411 = _1418;
5000
+ }
5001
+ _1407 = _1411; break L_1408;
4881
5002
  }
4882
5003
  case 39: {
4883
5004
 
4884
- let _1379;
4885
- L_1381: {
4886
- const _1380 = c.idx;
4887
- const _1383 = c.bindings;
4888
- const _1382 = {};
4889
- c.bindings = _1382;
4890
- let _1384;
4891
- const _1385 = c.tokens[c.idx];
4892
- if (_1385 !== undefined && (_1385.id === 39 || (_1385.id === undefined && _1385.type === "True"))) { c.idx++; _1384 = _1385; }
4893
- else { if (c.track) { E(c, "True"); } _1384 = F; }
4894
- if (_1384 === F) { c.idx = _1380; c.bindings = _1383; _1379 = F; break L_1381; }
4895
- const _1386 = H[60](_1382, c);
4896
- c.bindings = _1383;
4897
- _1379 = _1386;
4898
- }
4899
- _1367 = _1379; break L_1368;
5005
+ let _1419;
5006
+ L_1421: {
5007
+ const _1420 = c.idx;
5008
+ const _1423 = c.bindings;
5009
+ const _1422 = {};
5010
+ c.bindings = _1422;
5011
+ let _1424;
5012
+ const _1425 = c.tokens[c.idx];
5013
+ if (_1425 !== undefined && (_1425.id === 39 || (_1425.id === undefined && _1425.type === "True"))) { c.idx++; _1424 = _1425; }
5014
+ else { if (c.track) { E(c, "True"); } _1424 = F; }
5015
+ if (_1424 === F) { c.idx = _1420; c.bindings = _1423; _1419 = F; break L_1421; }
5016
+ const _1426 = H[61](_1422, c);
5017
+ c.bindings = _1423;
5018
+ _1419 = _1426;
5019
+ }
5020
+ _1407 = _1419; break L_1408;
4900
5021
  }
4901
5022
  case 40: {
4902
5023
 
4903
- let _1387;
4904
- L_1389: {
4905
- const _1388 = c.idx;
4906
- const _1391 = c.bindings;
4907
- const _1390 = {};
4908
- c.bindings = _1390;
4909
- let _1392;
4910
- const _1393 = c.tokens[c.idx];
4911
- if (_1393 !== undefined && (_1393.id === 40 || (_1393.id === undefined && _1393.type === "False"))) { c.idx++; _1392 = _1393; }
4912
- else { if (c.track) { E(c, "False"); } _1392 = F; }
4913
- if (_1392 === F) { c.idx = _1388; c.bindings = _1391; _1387 = F; break L_1389; }
4914
- const _1394 = H[61](_1390, c);
4915
- c.bindings = _1391;
4916
- _1387 = _1394;
4917
- }
4918
- _1367 = _1387; break L_1368;
5024
+ let _1427;
5025
+ L_1429: {
5026
+ const _1428 = c.idx;
5027
+ const _1431 = c.bindings;
5028
+ const _1430 = {};
5029
+ c.bindings = _1430;
5030
+ let _1432;
5031
+ const _1433 = c.tokens[c.idx];
5032
+ if (_1433 !== undefined && (_1433.id === 40 || (_1433.id === undefined && _1433.type === "False"))) { c.idx++; _1432 = _1433; }
5033
+ else { if (c.track) { E(c, "False"); } _1432 = F; }
5034
+ if (_1432 === F) { c.idx = _1428; c.bindings = _1431; _1427 = F; break L_1429; }
5035
+ const _1434 = H[62](_1430, c);
5036
+ c.bindings = _1431;
5037
+ _1427 = _1434;
5038
+ }
5039
+ _1407 = _1427; break L_1408;
4919
5040
  }
4920
5041
  case 7: {
4921
5042
 
4922
- let _1395;
4923
- L_1397: {
4924
- const _1396 = c.idx;
4925
- const _1399 = c.bindings;
4926
- const _1398 = {};
5043
+ let _1435;
5044
+ L_1437: {
5045
+ const _1436 = c.idx;
5046
+ const _1439 = c.bindings;
5047
+ const _1438 = {};
5048
+ c.bindings = _1438;
5049
+ let _1440;
5050
+ const _1441 = c.tokens[c.idx];
5051
+ if (_1441 !== undefined && (_1441.id === 7 || (_1441.id === undefined && _1441.type === "Distinct"))) { c.idx++; _1440 = _1441; }
5052
+ else { if (c.track) { E(c, "Distinct"); } _1440 = F; }
5053
+ if (_1440 === F) { c.idx = _1436; c.bindings = _1439; _1435 = F; break L_1437; }
5054
+ let _1442;
5055
+ const _1443 = c.tokens[c.idx];
5056
+ if (_1443 !== undefined && (_1443.id === 4 || (_1443.id === undefined && _1443.type === "From"))) { c.idx++; _1442 = _1443; }
5057
+ else { if (c.track) { E(c, "From"); } _1442 = F; }
5058
+ if (_1442 === F) { c.idx = _1436; c.bindings = _1439; _1435 = F; break L_1437; }
5059
+
5060
+ const _1446 = c.ruleDepth;
5061
+ if (c.track) { c.ruleNames[_1446] = "ConcatExpr"; c.ruleDepth = _1446 + 1; }
5062
+ const _1445 = R[56](c);
5063
+ if (c.track) c.ruleDepth = _1446;
5064
+ if (_1445 !== F) _1438["e"] = _1445;
5065
+ const _1444 = _1445;
5066
+ if (_1444 === F) { c.idx = _1436; c.bindings = _1439; _1435 = F; break L_1437; }
5067
+ const _1447 = H[63](_1438, c);
5068
+ c.bindings = _1439;
5069
+ _1435 = _1447;
5070
+ }
5071
+ _1407 = _1435; break L_1408;
5072
+ }
5073
+ default: { if (c.track) { E(c, "Null"); E(c, "True"); E(c, "False"); E(c, "Distinct"); } _1407 = F; break L_1408; }
5074
+ }
5075
+ }
5076
+ if (_1407 !== F) _1397["t"] = _1407;
5077
+ const _1406 = _1407;
5078
+ if (_1406 === F) { c.idx = _1395; c.bindings = _1398; _1394 = F; break L_1396; }
5079
+ const _1448 = H[64](_1397, c);
4927
5080
  c.bindings = _1398;
4928
- let _1400;
4929
- const _1401 = c.tokens[c.idx];
4930
- if (_1401 !== undefined && (_1401.id === 7 || (_1401.id === undefined && _1401.type === "Distinct"))) { c.idx++; _1400 = _1401; }
4931
- else { if (c.track) { E(c, "Distinct"); } _1400 = F; }
4932
- if (_1400 === F) { c.idx = _1396; c.bindings = _1399; _1395 = F; break L_1397; }
4933
- let _1402;
4934
- const _1403 = c.tokens[c.idx];
4935
- if (_1403 !== undefined && (_1403.id === 4 || (_1403.id === undefined && _1403.type === "From"))) { c.idx++; _1402 = _1403; }
4936
- else { if (c.track) { E(c, "From"); } _1402 = F; }
4937
- if (_1402 === F) { c.idx = _1396; c.bindings = _1399; _1395 = F; break L_1397; }
4938
-
4939
- const _1406 = c.ruleDepth;
4940
- if (c.track) { c.ruleNames[_1406] = "ConcatExpr"; c.ruleDepth = _1406 + 1; }
4941
- const _1405 = R[55](c);
4942
- if (c.track) c.ruleDepth = _1406;
4943
- if (_1405 !== F) _1398["e"] = _1405;
4944
- const _1404 = _1405;
4945
- if (_1404 === F) { c.idx = _1396; c.bindings = _1399; _1395 = F; break L_1397; }
4946
- const _1407 = H[62](_1398, c);
4947
- c.bindings = _1399;
4948
- _1395 = _1407;
4949
- }
4950
- _1367 = _1395; break L_1368;
5081
+ _1394 = _1448;
4951
5082
  }
4952
- default: { if (c.track) { E(c, "Null"); E(c, "True"); E(c, "False"); E(c, "Distinct"); } _1367 = F; break L_1368; }
5083
+ _1314 = _1394; break L_1315;
4953
5084
  }
5085
+ default: { if (c.track) { E(c, "Eq"); E(c, "EqEq"); E(c, "NotEq"); E(c, "BangEq"); E(c, "LtEq"); E(c, "GtEq"); E(c, "Lt"); E(c, "Gt"); E(c, "Not"); E(c, "In"); E(c, "Between"); E(c, "Like"); E(c, "Ilike"); E(c, "Is"); } _1314 = F; break L_1315; }
4954
5086
  }
4955
- if (_1367 !== F) _1357["t"] = _1367;
4956
- const _1366 = _1367;
4957
- if (_1366 === F) { c.idx = _1355; c.bindings = _1358; _1354 = F; break L_1356; }
4958
- const _1408 = H[63](_1357, c);
4959
- c.bindings = _1358;
4960
- _1354 = _1408;
4961
5087
  }
4962
- _1274 = _1354; break L_1275;
4963
- }
4964
- default: { if (c.track) { E(c, "Eq"); E(c, "EqEq"); E(c, "NotEq"); E(c, "BangEq"); E(c, "LtEq"); E(c, "GtEq"); E(c, "Lt"); E(c, "Gt"); E(c, "Not"); E(c, "In"); E(c, "Between"); E(c, "Like"); E(c, "Ilike"); E(c, "Is"); } _1274 = F; break L_1275; }
4965
- }
4966
- }
4967
- return _1274;
5088
+ return _1314;
4968
5089
  }
4969
5090
 
4970
5091
  // WhenClause
4971
- R[57] = (c) => {
4972
-
4973
- let _1409;
4974
- L_1411: {
4975
- const _1410 = c.idx;
4976
- const _1413 = c.bindings;
4977
- const _1412 = {};
4978
- c.bindings = _1412;
4979
- let _1414;
4980
- const _1415 = c.tokens[c.idx];
4981
- if (_1415 !== undefined && (_1415.id === 42 || (_1415.id === undefined && _1415.type === "When"))) { c.idx++; _1414 = _1415; }
4982
- else { if (c.track) { E(c, "When"); } _1414 = F; }
4983
- if (_1414 === F) { c.idx = _1410; c.bindings = _1413; _1409 = F; break L_1411; }
4984
-
4985
- const _1418 = c.ruleDepth;
4986
- if (c.track) { c.ruleNames[_1418] = "Expression"; c.ruleDepth = _1418 + 1; }
4987
- const _1417 = R[19](c);
4988
- if (c.track) c.ruleDepth = _1418;
4989
- if (_1417 !== F) _1412["cond"] = _1417;
4990
- const _1416 = _1417;
4991
- if (_1416 === F) { c.idx = _1410; c.bindings = _1413; _1409 = F; break L_1411; }
4992
- let _1419;
4993
- const _1420 = c.tokens[c.idx];
4994
- if (_1420 !== undefined && (_1420.id === 43 || (_1420.id === undefined && _1420.type === "Then"))) { c.idx++; _1419 = _1420; }
4995
- else { if (c.track) { E(c, "Then"); } _1419 = F; }
4996
- if (_1419 === F) { c.idx = _1410; c.bindings = _1413; _1409 = F; break L_1411; }
5092
+ R[58] = (c) => {
4997
5093
 
4998
- const _1423 = c.ruleDepth;
4999
- if (c.track) { c.ruleNames[_1423] = "Expression"; c.ruleDepth = _1423 + 1; }
5000
- const _1422 = R[19](c);
5001
- if (c.track) c.ruleDepth = _1423;
5002
- if (_1422 !== F) _1412["result"] = _1422;
5003
- const _1421 = _1422;
5004
- if (_1421 === F) { c.idx = _1410; c.bindings = _1413; _1409 = F; break L_1411; }
5005
- const _1424 = H[64](_1412, c);
5006
- c.bindings = _1413;
5007
- _1409 = _1424;
5008
- }
5009
- return _1409;
5094
+ let _1449;
5095
+ L_1451: {
5096
+ const _1450 = c.idx;
5097
+ const _1453 = c.bindings;
5098
+ const _1452 = {};
5099
+ c.bindings = _1452;
5100
+ let _1454;
5101
+ const _1455 = c.tokens[c.idx];
5102
+ if (_1455 !== undefined && (_1455.id === 42 || (_1455.id === undefined && _1455.type === "When"))) { c.idx++; _1454 = _1455; }
5103
+ else { if (c.track) { E(c, "When"); } _1454 = F; }
5104
+ if (_1454 === F) { c.idx = _1450; c.bindings = _1453; _1449 = F; break L_1451; }
5105
+
5106
+ const _1458 = c.ruleDepth;
5107
+ if (c.track) { c.ruleNames[_1458] = "Expression"; c.ruleDepth = _1458 + 1; }
5108
+ const _1457 = R[19](c);
5109
+ if (c.track) c.ruleDepth = _1458;
5110
+ if (_1457 !== F) _1452["cond"] = _1457;
5111
+ const _1456 = _1457;
5112
+ if (_1456 === F) { c.idx = _1450; c.bindings = _1453; _1449 = F; break L_1451; }
5113
+ let _1459;
5114
+ const _1460 = c.tokens[c.idx];
5115
+ if (_1460 !== undefined && (_1460.id === 43 || (_1460.id === undefined && _1460.type === "Then"))) { c.idx++; _1459 = _1460; }
5116
+ else { if (c.track) { E(c, "Then"); } _1459 = F; }
5117
+ if (_1459 === F) { c.idx = _1450; c.bindings = _1453; _1449 = F; break L_1451; }
5118
+
5119
+ const _1463 = c.ruleDepth;
5120
+ if (c.track) { c.ruleNames[_1463] = "Expression"; c.ruleDepth = _1463 + 1; }
5121
+ const _1462 = R[19](c);
5122
+ if (c.track) c.ruleDepth = _1463;
5123
+ if (_1462 !== F) _1452["result"] = _1462;
5124
+ const _1461 = _1462;
5125
+ if (_1461 === F) { c.idx = _1450; c.bindings = _1453; _1449 = F; break L_1451; }
5126
+ const _1464 = H[65](_1452, c);
5127
+ c.bindings = _1453;
5128
+ _1449 = _1464;
5129
+ }
5130
+ return _1449;
5010
5131
  }
5011
5132
 
5012
5133
  // WindowSpec
5013
- R[58] = (c) => {
5134
+ R[59] = (c) => {
5014
5135
 
5015
- let _1425;
5016
- L_1427: {
5017
- const _1426 = c.idx;
5018
- const _1429 = c.bindings;
5019
- const _1428 = {};
5020
- c.bindings = _1428;
5021
- let _1430;
5022
- const _1431 = c.tokens[c.idx];
5023
- if (_1431 !== undefined && (_1431.id === 80 || (_1431.id === undefined && _1431.type === "LParen"))) { c.idx++; _1430 = _1431; }
5024
- else { if (c.track) { E(c, "LParen"); } _1430 = F; }
5025
- if (_1430 === F) { c.idx = _1426; c.bindings = _1429; _1425 = F; break L_1427; }
5026
- let _1433;
5027
- const _1434 = c.idx;
5136
+ let _1465;
5137
+ L_1467: {
5138
+ const _1466 = c.idx;
5139
+ const _1469 = c.bindings;
5140
+ const _1468 = {};
5141
+ c.bindings = _1468;
5142
+ let _1470;
5143
+ const _1471 = c.tokens[c.idx];
5144
+ if (_1471 !== undefined && (_1471.id === 82 || (_1471.id === undefined && _1471.type === "LParen"))) { c.idx++; _1470 = _1471; }
5145
+ else { if (c.track) { E(c, "LParen"); } _1470 = F; }
5146
+ if (_1470 === F) { c.idx = _1466; c.bindings = _1469; _1465 = F; break L_1467; }
5147
+ let _1473;
5148
+ const _1474 = c.idx;
5028
5149
  {
5029
5150
 
5030
- let _1435;
5031
- L_1436: {
5032
- const _1437 = c.idx;
5033
- let _1438;
5034
- const _1439 = c.tokens[c.idx];
5035
- if (_1439 !== undefined && (_1439.id === 54 || (_1439.id === undefined && _1439.type === "Partition"))) { c.idx++; _1438 = _1439; }
5036
- else { if (c.track) { E(c, "Partition"); } _1438 = F; }
5037
- if (_1438 === F) { c.idx = _1437; _1435 = F; break L_1436; }
5038
- let _1440;
5039
- const _1441 = c.tokens[c.idx];
5040
- if (_1441 !== undefined && (_1441.id === 28 || (_1441.id === undefined && _1441.type === "By"))) { c.idx++; _1440 = _1441; }
5041
- else { if (c.track) { E(c, "By"); } _1440 = F; }
5042
- if (_1440 === F) { c.idx = _1437; _1435 = F; break L_1436; }
5043
-
5044
- let _1442 = [];
5045
- L_1446: {
5046
- const _1443 = c.idx;
5047
-
5048
- const _1448 = c.ruleDepth;
5049
- if (c.track) { c.ruleNames[_1448] = "Expression"; c.ruleDepth = _1448 + 1; }
5050
- const _1447 = R[19](c);
5051
- if (c.track) c.ruleDepth = _1448;
5052
- if (_1447 === F) { c.idx = _1443; _1442 = F; break L_1446; }
5053
- _1442.push(_1447);
5151
+ let _1475;
5152
+ L_1476: {
5153
+ const _1477 = c.idx;
5154
+ let _1478;
5155
+ const _1479 = c.tokens[c.idx];
5156
+ if (_1479 !== undefined && (_1479.id === 54 || (_1479.id === undefined && _1479.type === "Partition"))) { c.idx++; _1478 = _1479; }
5157
+ else { if (c.track) { E(c, "Partition"); } _1478 = F; }
5158
+ if (_1478 === F) { c.idx = _1477; _1475 = F; break L_1476; }
5159
+ let _1480;
5160
+ const _1481 = c.tokens[c.idx];
5161
+ if (_1481 !== undefined && (_1481.id === 28 || (_1481.id === undefined && _1481.type === "By"))) { c.idx++; _1480 = _1481; }
5162
+ else { if (c.track) { E(c, "By"); } _1480 = F; }
5163
+ if (_1480 === F) { c.idx = _1477; _1475 = F; break L_1476; }
5164
+
5165
+ let _1482 = [];
5166
+ L_1486: {
5167
+ const _1483 = c.idx;
5168
+
5169
+ const _1488 = c.ruleDepth;
5170
+ if (c.track) { c.ruleNames[_1488] = "Expression"; c.ruleDepth = _1488 + 1; }
5171
+ const _1487 = R[19](c);
5172
+ if (c.track) c.ruleDepth = _1488;
5173
+ if (_1487 === F) { c.idx = _1483; _1482 = F; break L_1486; }
5174
+ _1482.push(_1487);
5054
5175
  for (;;) {
5055
- const _1444 = c.idx;
5056
- let _1449;
5057
- const _1450 = c.tokens[c.idx];
5058
- if (_1450 !== undefined && (_1450.id === 84 || (_1450.id === undefined && _1450.type === "Comma"))) { c.idx++; _1449 = _1450; }
5059
- else { if (c.track) { E(c, "Comma"); } _1449 = F; }
5060
- if (_1449 === F) { c.idx = _1444; break; }
5061
- const _1445 = c.idx;
5062
-
5063
- const _1452 = c.ruleDepth;
5064
- if (c.track) { c.ruleNames[_1452] = "Expression"; c.ruleDepth = _1452 + 1; }
5065
- const _1451 = R[19](c);
5066
- if (c.track) c.ruleDepth = _1452;
5067
- if (_1451 === F) { c.idx = _1444; break; }
5068
- _1442.push(_1451);
5069
- }
5070
- }
5071
- if (_1442 === F) { c.idx = _1437; _1435 = F; break L_1436; }
5072
- _1435 = _1442;
5073
- }
5074
- if (_1435 === F) { c.idx = _1434; _1433 = null; } else _1433 = _1435;
5075
- }
5076
- if (_1433 !== F) _1428["partitionBy"] = _1433;
5077
- const _1432 = _1433;
5078
- if (_1432 === F) { c.idx = _1426; c.bindings = _1429; _1425 = F; break L_1427; }
5079
- let _1454;
5080
- const _1455 = c.idx;
5176
+ const _1484 = c.idx;
5177
+ let _1489;
5178
+ const _1490 = c.tokens[c.idx];
5179
+ if (_1490 !== undefined && (_1490.id === 86 || (_1490.id === undefined && _1490.type === "Comma"))) { c.idx++; _1489 = _1490; }
5180
+ else { if (c.track) { E(c, "Comma"); } _1489 = F; }
5181
+ if (_1489 === F) { c.idx = _1484; break; }
5182
+ const _1485 = c.idx;
5183
+
5184
+ const _1492 = c.ruleDepth;
5185
+ if (c.track) { c.ruleNames[_1492] = "Expression"; c.ruleDepth = _1492 + 1; }
5186
+ const _1491 = R[19](c);
5187
+ if (c.track) c.ruleDepth = _1492;
5188
+ if (_1491 === F) { c.idx = _1484; break; }
5189
+ _1482.push(_1491);
5190
+ }
5191
+ }
5192
+ if (_1482 === F) { c.idx = _1477; _1475 = F; break L_1476; }
5193
+ _1475 = _1482;
5194
+ }
5195
+ if (_1475 === F) { c.idx = _1474; _1473 = null; } else _1473 = _1475;
5196
+ }
5197
+ if (_1473 !== F) _1468["partitionBy"] = _1473;
5198
+ const _1472 = _1473;
5199
+ if (_1472 === F) { c.idx = _1466; c.bindings = _1469; _1465 = F; break L_1467; }
5200
+ let _1494;
5201
+ const _1495 = c.idx;
5081
5202
  {
5082
5203
 
5083
- const _1457 = c.ruleDepth;
5084
- if (c.track) { c.ruleNames[_1457] = "OrderByClause"; c.ruleDepth = _1457 + 1; }
5085
- const _1456 = R[6](c);
5086
- if (c.track) c.ruleDepth = _1457;
5087
- if (_1456 === F) { c.idx = _1455; _1454 = null; } else _1454 = _1456;
5204
+ const _1497 = c.ruleDepth;
5205
+ if (c.track) { c.ruleNames[_1497] = "OrderByClause"; c.ruleDepth = _1497 + 1; }
5206
+ const _1496 = R[6](c);
5207
+ if (c.track) c.ruleDepth = _1497;
5208
+ if (_1496 === F) { c.idx = _1495; _1494 = null; } else _1494 = _1496;
5088
5209
  }
5089
- if (_1454 !== F) _1428["orderBy"] = _1454;
5090
- const _1453 = _1454;
5091
- if (_1453 === F) { c.idx = _1426; c.bindings = _1429; _1425 = F; break L_1427; }
5092
- let _1458;
5093
- const _1459 = c.tokens[c.idx];
5094
- if (_1459 !== undefined && (_1459.id === 81 || (_1459.id === undefined && _1459.type === "RParen"))) { c.idx++; _1458 = _1459; }
5095
- else { if (c.track) { E(c, "RParen"); } _1458 = F; }
5096
- if (_1458 === F) { c.idx = _1426; c.bindings = _1429; _1425 = F; break L_1427; }
5097
- const _1460 = H[65](_1428, c);
5098
- c.bindings = _1429;
5099
- _1425 = _1460;
5210
+ if (_1494 !== F) _1468["orderBy"] = _1494;
5211
+ const _1493 = _1494;
5212
+ if (_1493 === F) { c.idx = _1466; c.bindings = _1469; _1465 = F; break L_1467; }
5213
+ let _1498;
5214
+ const _1499 = c.tokens[c.idx];
5215
+ if (_1499 !== undefined && (_1499.id === 83 || (_1499.id === undefined && _1499.type === "RParen"))) { c.idx++; _1498 = _1499; }
5216
+ else { if (c.track) { E(c, "RParen"); } _1498 = F; }
5217
+ if (_1498 === F) { c.idx = _1466; c.bindings = _1469; _1465 = F; break L_1467; }
5218
+ const _1500 = H[66](_1468, c);
5219
+ c.bindings = _1469;
5220
+ _1465 = _1500;
5100
5221
  }
5101
- return _1425;
5222
+ return _1465;
5102
5223
  }
5103
5224
 
5104
5225
  // ConcatExpr$tower
5105
- R[59] = (c) => {
5226
+ R[60] = (c) => {
5106
5227
 
5107
- let _1461;
5108
- L_1462: {
5228
+ let _1501;
5229
+ L_1502: {
5109
5230
 
5110
- const _1467 = c.ruleDepth;
5111
- if (c.track) { c.ruleNames[_1467] = "Additive"; c.ruleDepth = _1467 + 1; }
5112
- const _1466 = R[14](c);
5113
- if (c.track) c.ruleDepth = _1467;
5114
- if (_1466 === F) { _1461 = F; break L_1462; }
5115
- let _1463 = _1466;
5116
- let _1464 = null;
5231
+ const _1507 = c.ruleDepth;
5232
+ if (c.track) { c.ruleNames[_1507] = "Additive"; c.ruleDepth = _1507 + 1; }
5233
+ const _1506 = R[14](c);
5234
+ if (c.track) c.ruleDepth = _1507;
5235
+ if (_1506 === F) { _1501 = F; break L_1502; }
5236
+ let _1503 = _1506;
5237
+ let _1504 = null;
5117
5238
  for (;;) {
5118
- const _1465 = c.idx;
5119
- let _1468;
5120
- const _1469 = c.tokens[c.idx];
5121
- if (_1469 !== undefined && (_1469.id === 66 || (_1469.id === undefined && _1469.type === "Concat"))) { c.idx++; _1468 = _1469; }
5122
- else { if (c.track) { E(c, "Concat"); } _1468 = F; }
5123
- if (_1468 === F) { c.idx = _1465; break; }
5239
+ const _1505 = c.idx;
5240
+ let _1508;
5241
+ const _1509 = c.tokens[c.idx];
5242
+ if (_1509 !== undefined && (_1509.id === 68 || (_1509.id === undefined && _1509.type === "Concat"))) { c.idx++; _1508 = _1509; }
5243
+ else { if (c.track) { E(c, "Concat"); } _1508 = F; }
5244
+ if (_1508 === F) { c.idx = _1505; break; }
5124
5245
 
5125
- const _1471 = c.ruleDepth;
5126
- if (c.track) { c.ruleNames[_1471] = "Additive"; c.ruleDepth = _1471 + 1; }
5127
- const _1470 = R[14](c);
5128
- if (c.track) c.ruleDepth = _1471;
5129
- if (_1470 === F) { c.idx = _1465; break; }
5130
- if (_1464 === null) _1464 = { left: null, op: null, right: null };
5131
- _1464.left = _1463; _1464.op = _1468; _1464.right = _1470;
5132
- _1463 = H[66](_1464, c);
5246
+ const _1511 = c.ruleDepth;
5247
+ if (c.track) { c.ruleNames[_1511] = "Additive"; c.ruleDepth = _1511 + 1; }
5248
+ const _1510 = R[14](c);
5249
+ if (c.track) c.ruleDepth = _1511;
5250
+ if (_1510 === F) { c.idx = _1505; break; }
5251
+ if (_1504 === null) _1504 = { left: null, op: null, right: null };
5252
+ _1504.left = _1503; _1504.op = _1508; _1504.right = _1510;
5253
+ _1503 = H[67](_1504, c);
5133
5254
  }
5134
- _1461 = _1463;
5255
+ _1501 = _1503;
5135
5256
  }
5136
- return _1461;
5257
+ return _1501;
5137
5258
  }
5138
5259
 
5139
5260
  // InTail
5140
- R[60] = (c) => {
5141
-
5142
- let _1473;
5143
- L_1474: {
5144
- const _1475 = c.idx;
5145
- let _1476;
5146
- const _1477 = c.tokens[c.idx];
5147
- if (_1477 !== undefined && (_1477.id === 12 || (_1477.id === undefined && _1477.type === "In"))) { c.idx++; _1476 = _1477; }
5148
- else { if (c.track) { E(c, "In"); } _1476 = F; }
5149
- if (_1476 === F) { c.idx = _1475; _1473 = F; break L_1474; }
5150
- let _1478;
5151
- const _1479 = c.tokens[c.idx];
5152
- if (_1479 !== undefined && (_1479.id === 80 || (_1479.id === undefined && _1479.type === "LParen"))) { c.idx++; _1478 = _1479; }
5153
- else { if (c.track) { E(c, "LParen"); } _1478 = F; }
5154
- if (_1478 === F) { c.idx = _1475; _1473 = F; break L_1474; }
5261
+ R[61] = (c) => {
5155
5262
 
5156
- let _1480;
5157
- L_1481: {
5158
- const _1482 = c.tokens[c.idx];
5159
- if (_1482 === undefined) { if (c.track) { E(c, "With"); E(c, "LParen"); E(c, "Select"); E(c, "Values"); E(c, "Not"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _1480 = F; break L_1481; }
5160
- const _1483 = _1482.id !== undefined ? _1482.id : I[_1482.type];
5161
- switch (_1483) {
5263
+ let _1513;
5264
+ L_1514: {
5265
+ const _1515 = c.idx;
5266
+ let _1516;
5267
+ const _1517 = c.tokens[c.idx];
5268
+ if (_1517 !== undefined && (_1517.id === 12 || (_1517.id === undefined && _1517.type === "In"))) { c.idx++; _1516 = _1517; }
5269
+ else { if (c.track) { E(c, "In"); } _1516 = F; }
5270
+ if (_1516 === F) { c.idx = _1515; _1513 = F; break L_1514; }
5271
+ let _1518;
5272
+ const _1519 = c.tokens[c.idx];
5273
+ if (_1519 !== undefined && (_1519.id === 82 || (_1519.id === undefined && _1519.type === "LParen"))) { c.idx++; _1518 = _1519; }
5274
+ else { if (c.track) { E(c, "LParen"); } _1518 = F; }
5275
+ if (_1518 === F) { c.idx = _1515; _1513 = F; break L_1514; }
5276
+
5277
+ let _1520;
5278
+ L_1521: {
5279
+ const _1522 = c.tokens[c.idx];
5280
+ if (_1522 === undefined) { if (c.track) { E(c, "With"); E(c, "LParen"); E(c, "Select"); E(c, "Values"); E(c, "Not"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Pivot"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _1520 = F; break L_1521; }
5281
+ const _1523 = _1522.id !== undefined ? _1522.id : I[_1522.type];
5282
+ switch (_1523) {
5162
5283
  case 46: case 3: case 38: {
5163
5284
 
5164
- const _1487 = c.ruleDepth;
5165
- if (c.track) { c.ruleNames[_1487] = "Query"; c.ruleDepth = _1487 + 1; }
5166
- const _1486 = R[2](c);
5167
- if (c.track) c.ruleDepth = _1487;
5168
- const _1485 = _1486 === F ? F : H[67](_1486, c);
5169
- _1480 = _1485; break L_1481;
5285
+ const _1527 = c.ruleDepth;
5286
+ if (c.track) { c.ruleNames[_1527] = "Query"; c.ruleDepth = _1527 + 1; }
5287
+ const _1526 = R[2](c);
5288
+ if (c.track) c.ruleDepth = _1527;
5289
+ const _1525 = _1526 === F ? F : H[68](_1526, c);
5290
+ _1520 = _1525; break L_1521;
5170
5291
  }
5171
- case 80: {
5172
- let _1488;
5173
- L_1489: {
5174
- const _1490 = c.idx;
5175
- let _1491 = 3;
5292
+ case 82: {
5293
+ let _1528;
5294
+ L_1529: {
5295
+ const _1530 = c.idx;
5296
+ let _1531 = 3;
5176
5297
  if (!c.track) {
5177
- const _1492 = c.tokens[_1490 + 1];
5178
- switch (_1492 === undefined ? -1 : (_1492.id !== undefined ? _1492.id : I[_1492.type])) {
5179
- case 46: case 3: case 80: case 38: _1491 = 3; break;
5180
- case 11: case 76: case 75: case 39: case 40: case 14: case 51: case 52: case 60: case 58: case 59: case 19: case 20: case 56: case 57: case 87: case 61: case 65: case 50: case 41: _1491 = 2; break;
5181
- default: _1491 = 0; break;
5182
- }
5183
- }
5184
- if (_1491 & 1) {
5185
-
5186
- const _1496 = c.ruleDepth;
5187
- if (c.track) { c.ruleNames[_1496] = "Query"; c.ruleDepth = _1496 + 1; }
5188
- const _1495 = R[2](c);
5189
- if (c.track) c.ruleDepth = _1496;
5190
- const _1494 = _1495 === F ? F : H[68](_1495, c);
5191
- if (_1494 !== F) { _1488 = _1494; break L_1489; }
5192
- c.idx = _1490;
5193
- }
5194
- if (_1491 & 2) {
5195
-
5196
- let _1499 = [];
5197
- L_1503: {
5198
- const _1500 = c.idx;
5199
-
5200
- const _1505 = c.ruleDepth;
5201
- if (c.track) { c.ruleNames[_1505] = "Expression"; c.ruleDepth = _1505 + 1; }
5202
- const _1504 = R[19](c);
5203
- if (c.track) c.ruleDepth = _1505;
5204
- if (_1504 === F) { c.idx = _1500; _1499 = F; break L_1503; }
5205
- _1499.push(_1504);
5298
+ const _1532 = c.tokens[_1530 + 1];
5299
+ switch (_1532 === undefined ? -1 : (_1532.id !== undefined ? _1532.id : I[_1532.type])) {
5300
+ case 46: case 3: case 82: case 38: _1531 = 3; break;
5301
+ case 11: case 78: case 77: case 39: case 40: case 14: case 51: case 52: case 57: case 62: case 60: case 61: case 19: case 20: case 58: case 59: case 89: case 63: case 67: case 50: case 41: _1531 = 2; break;
5302
+ default: _1531 = 0; break;
5303
+ }
5304
+ }
5305
+ if (_1531 & 1) {
5306
+
5307
+ const _1536 = c.ruleDepth;
5308
+ if (c.track) { c.ruleNames[_1536] = "Query"; c.ruleDepth = _1536 + 1; }
5309
+ const _1535 = R[2](c);
5310
+ if (c.track) c.ruleDepth = _1536;
5311
+ const _1534 = _1535 === F ? F : H[69](_1535, c);
5312
+ if (_1534 !== F) { _1528 = _1534; break L_1529; }
5313
+ c.idx = _1530;
5314
+ }
5315
+ if (_1531 & 2) {
5316
+
5317
+ let _1539 = [];
5318
+ L_1543: {
5319
+ const _1540 = c.idx;
5320
+
5321
+ const _1545 = c.ruleDepth;
5322
+ if (c.track) { c.ruleNames[_1545] = "Expression"; c.ruleDepth = _1545 + 1; }
5323
+ const _1544 = R[19](c);
5324
+ if (c.track) c.ruleDepth = _1545;
5325
+ if (_1544 === F) { c.idx = _1540; _1539 = F; break L_1543; }
5326
+ _1539.push(_1544);
5206
5327
  for (;;) {
5207
- const _1501 = c.idx;
5208
- let _1506;
5209
- const _1507 = c.tokens[c.idx];
5210
- if (_1507 !== undefined && (_1507.id === 84 || (_1507.id === undefined && _1507.type === "Comma"))) { c.idx++; _1506 = _1507; }
5211
- else { if (c.track) { E(c, "Comma"); } _1506 = F; }
5212
- if (_1506 === F) { c.idx = _1501; break; }
5213
- const _1502 = c.idx;
5214
-
5215
- const _1509 = c.ruleDepth;
5216
- if (c.track) { c.ruleNames[_1509] = "Expression"; c.ruleDepth = _1509 + 1; }
5217
- const _1508 = R[19](c);
5218
- if (c.track) c.ruleDepth = _1509;
5219
- if (_1508 === F) { c.idx = _1501; break; }
5220
- _1499.push(_1508);
5221
- }
5222
- }
5223
- const _1498 = _1499 === F ? F : H[69](_1499, c);
5224
- if (_1498 !== F) { _1488 = _1498; break L_1489; }
5225
- c.idx = _1490;
5226
- }
5227
- _1488 = F;
5228
- }
5229
- _1480 = _1488; break L_1481;
5230
- }
5231
- case 11: case 76: case 75: case 39: case 40: case 14: case 50: case 41: case 51: case 52: case 60: case 58: case 59: case 19: case 20: case 56: case 57: case 87: case 61: case 65: {
5232
-
5233
- let _1512 = [];
5234
- L_1516: {
5235
- const _1513 = c.idx;
5236
-
5237
- const _1518 = c.ruleDepth;
5238
- if (c.track) { c.ruleNames[_1518] = "Expression"; c.ruleDepth = _1518 + 1; }
5239
- const _1517 = R[19](c);
5240
- if (c.track) c.ruleDepth = _1518;
5241
- if (_1517 === F) { c.idx = _1513; _1512 = F; break L_1516; }
5242
- _1512.push(_1517);
5328
+ const _1541 = c.idx;
5329
+ let _1546;
5330
+ const _1547 = c.tokens[c.idx];
5331
+ if (_1547 !== undefined && (_1547.id === 86 || (_1547.id === undefined && _1547.type === "Comma"))) { c.idx++; _1546 = _1547; }
5332
+ else { if (c.track) { E(c, "Comma"); } _1546 = F; }
5333
+ if (_1546 === F) { c.idx = _1541; break; }
5334
+ const _1542 = c.idx;
5335
+
5336
+ const _1549 = c.ruleDepth;
5337
+ if (c.track) { c.ruleNames[_1549] = "Expression"; c.ruleDepth = _1549 + 1; }
5338
+ const _1548 = R[19](c);
5339
+ if (c.track) c.ruleDepth = _1549;
5340
+ if (_1548 === F) { c.idx = _1541; break; }
5341
+ _1539.push(_1548);
5342
+ }
5343
+ }
5344
+ const _1538 = _1539 === F ? F : H[70](_1539, c);
5345
+ if (_1538 !== F) { _1528 = _1538; break L_1529; }
5346
+ c.idx = _1530;
5347
+ }
5348
+ _1528 = F;
5349
+ }
5350
+ _1520 = _1528; break L_1521;
5351
+ }
5352
+ case 11: case 78: case 77: case 39: case 40: case 14: case 50: case 41: case 51: case 52: case 57: case 62: case 60: case 61: case 19: case 20: case 58: case 59: case 89: case 63: case 67: {
5353
+
5354
+ let _1552 = [];
5355
+ L_1556: {
5356
+ const _1553 = c.idx;
5357
+
5358
+ const _1558 = c.ruleDepth;
5359
+ if (c.track) { c.ruleNames[_1558] = "Expression"; c.ruleDepth = _1558 + 1; }
5360
+ const _1557 = R[19](c);
5361
+ if (c.track) c.ruleDepth = _1558;
5362
+ if (_1557 === F) { c.idx = _1553; _1552 = F; break L_1556; }
5363
+ _1552.push(_1557);
5243
5364
  for (;;) {
5244
- const _1514 = c.idx;
5245
- let _1519;
5246
- const _1520 = c.tokens[c.idx];
5247
- if (_1520 !== undefined && (_1520.id === 84 || (_1520.id === undefined && _1520.type === "Comma"))) { c.idx++; _1519 = _1520; }
5248
- else { if (c.track) { E(c, "Comma"); } _1519 = F; }
5249
- if (_1519 === F) { c.idx = _1514; break; }
5250
- const _1515 = c.idx;
5365
+ const _1554 = c.idx;
5366
+ let _1559;
5367
+ const _1560 = c.tokens[c.idx];
5368
+ if (_1560 !== undefined && (_1560.id === 86 || (_1560.id === undefined && _1560.type === "Comma"))) { c.idx++; _1559 = _1560; }
5369
+ else { if (c.track) { E(c, "Comma"); } _1559 = F; }
5370
+ if (_1559 === F) { c.idx = _1554; break; }
5371
+ const _1555 = c.idx;
5251
5372
 
5252
- const _1522 = c.ruleDepth;
5253
- if (c.track) { c.ruleNames[_1522] = "Expression"; c.ruleDepth = _1522 + 1; }
5254
- const _1521 = R[19](c);
5255
- if (c.track) c.ruleDepth = _1522;
5256
- if (_1521 === F) { c.idx = _1514; break; }
5257
- _1512.push(_1521);
5373
+ const _1562 = c.ruleDepth;
5374
+ if (c.track) { c.ruleNames[_1562] = "Expression"; c.ruleDepth = _1562 + 1; }
5375
+ const _1561 = R[19](c);
5376
+ if (c.track) c.ruleDepth = _1562;
5377
+ if (_1561 === F) { c.idx = _1554; break; }
5378
+ _1552.push(_1561);
5258
5379
  }
5259
5380
  }
5260
- const _1511 = _1512 === F ? F : H[70](_1512, c);
5261
- _1480 = _1511; break L_1481;
5381
+ const _1551 = _1552 === F ? F : H[71](_1552, c);
5382
+ _1520 = _1551; break L_1521;
5262
5383
  }
5263
- default: { if (c.track) { E(c, "With"); E(c, "LParen"); E(c, "Select"); E(c, "Values"); E(c, "Not"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _1480 = F; break L_1481; }
5384
+ default: { if (c.track) { E(c, "With"); E(c, "LParen"); E(c, "Select"); E(c, "Values"); E(c, "Not"); E(c, "Minus"); E(c, "Plus"); E(c, "True"); E(c, "False"); E(c, "Null"); E(c, "Exists"); E(c, "Case"); E(c, "Cast"); E(c, "Extract"); E(c, "Pivot"); E(c, "Identifier"); E(c, "QuotedIdent"); E(c, "BacktickIdent"); E(c, "Left"); E(c, "Right"); E(c, "Number"); E(c, "String"); E(c, "QMark"); E(c, "DollarParam"); E(c, "NamedParam"); } _1520 = F; break L_1521; }
5264
5385
  }
5265
5386
  }
5266
- if (_1480 === F) { c.idx = _1475; _1473 = F; break L_1474; }
5267
- let _1523;
5268
- const _1524 = c.tokens[c.idx];
5269
- if (_1524 !== undefined && (_1524.id === 81 || (_1524.id === undefined && _1524.type === "RParen"))) { c.idx++; _1523 = _1524; }
5270
- else { if (c.track) { E(c, "RParen"); } _1523 = F; }
5271
- if (_1523 === F) { c.idx = _1475; _1473 = F; break L_1474; }
5272
- _1473 = _1480;
5387
+ if (_1520 === F) { c.idx = _1515; _1513 = F; break L_1514; }
5388
+ let _1563;
5389
+ const _1564 = c.tokens[c.idx];
5390
+ if (_1564 !== undefined && (_1564.id === 83 || (_1564.id === undefined && _1564.type === "RParen"))) { c.idx++; _1563 = _1564; }
5391
+ else { if (c.track) { E(c, "RParen"); } _1563 = F; }
5392
+ if (_1563 === F) { c.idx = _1515; _1513 = F; break L_1514; }
5393
+ _1513 = _1520;
5273
5394
  }
5274
- return _1473;
5395
+ return _1513;
5275
5396
  }
5276
5397
 
5277
5398
  // BetweenTail
5278
- R[61] = (c) => {
5399
+ R[62] = (c) => {
5279
5400
 
5280
- let _1525;
5281
- L_1527: {
5282
- const _1526 = c.idx;
5283
- const _1529 = c.bindings;
5284
- const _1528 = {};
5285
- c.bindings = _1528;
5286
- let _1530;
5287
- const _1531 = c.tokens[c.idx];
5288
- if (_1531 !== undefined && (_1531.id === 17 || (_1531.id === undefined && _1531.type === "Between"))) { c.idx++; _1530 = _1531; }
5289
- else { if (c.track) { E(c, "Between"); } _1530 = F; }
5290
- if (_1530 === F) { c.idx = _1526; c.bindings = _1529; _1525 = F; break L_1527; }
5291
-
5292
- const _1534 = c.ruleDepth;
5293
- if (c.track) { c.ruleNames[_1534] = "ConcatExpr"; c.ruleDepth = _1534 + 1; }
5294
- const _1533 = R[55](c);
5295
- if (c.track) c.ruleDepth = _1534;
5296
- if (_1533 !== F) _1528["low"] = _1533;
5297
- const _1532 = _1533;
5298
- if (_1532 === F) { c.idx = _1526; c.bindings = _1529; _1525 = F; break L_1527; }
5299
- let _1535;
5300
- const _1536 = c.tokens[c.idx];
5301
- if (_1536 !== undefined && (_1536.id === 9 || (_1536.id === undefined && _1536.type === "And"))) { c.idx++; _1535 = _1536; }
5302
- else { if (c.track) { E(c, "And"); } _1535 = F; }
5303
- if (_1535 === F) { c.idx = _1526; c.bindings = _1529; _1525 = F; break L_1527; }
5304
-
5305
- const _1539 = c.ruleDepth;
5306
- if (c.track) { c.ruleNames[_1539] = "ConcatExpr"; c.ruleDepth = _1539 + 1; }
5307
- const _1538 = R[55](c);
5308
- if (c.track) c.ruleDepth = _1539;
5309
- if (_1538 !== F) _1528["high"] = _1538;
5310
- const _1537 = _1538;
5311
- if (_1537 === F) { c.idx = _1526; c.bindings = _1529; _1525 = F; break L_1527; }
5312
- const _1540 = H[71](_1528, c);
5313
- c.bindings = _1529;
5314
- _1525 = _1540;
5315
- }
5316
- return _1525;
5401
+ let _1565;
5402
+ L_1567: {
5403
+ const _1566 = c.idx;
5404
+ const _1569 = c.bindings;
5405
+ const _1568 = {};
5406
+ c.bindings = _1568;
5407
+ let _1570;
5408
+ const _1571 = c.tokens[c.idx];
5409
+ if (_1571 !== undefined && (_1571.id === 17 || (_1571.id === undefined && _1571.type === "Between"))) { c.idx++; _1570 = _1571; }
5410
+ else { if (c.track) { E(c, "Between"); } _1570 = F; }
5411
+ if (_1570 === F) { c.idx = _1566; c.bindings = _1569; _1565 = F; break L_1567; }
5412
+
5413
+ const _1574 = c.ruleDepth;
5414
+ if (c.track) { c.ruleNames[_1574] = "ConcatExpr"; c.ruleDepth = _1574 + 1; }
5415
+ const _1573 = R[56](c);
5416
+ if (c.track) c.ruleDepth = _1574;
5417
+ if (_1573 !== F) _1568["low"] = _1573;
5418
+ const _1572 = _1573;
5419
+ if (_1572 === F) { c.idx = _1566; c.bindings = _1569; _1565 = F; break L_1567; }
5420
+ let _1575;
5421
+ const _1576 = c.tokens[c.idx];
5422
+ if (_1576 !== undefined && (_1576.id === 9 || (_1576.id === undefined && _1576.type === "And"))) { c.idx++; _1575 = _1576; }
5423
+ else { if (c.track) { E(c, "And"); } _1575 = F; }
5424
+ if (_1575 === F) { c.idx = _1566; c.bindings = _1569; _1565 = F; break L_1567; }
5425
+
5426
+ const _1579 = c.ruleDepth;
5427
+ if (c.track) { c.ruleNames[_1579] = "ConcatExpr"; c.ruleDepth = _1579 + 1; }
5428
+ const _1578 = R[56](c);
5429
+ if (c.track) c.ruleDepth = _1579;
5430
+ if (_1578 !== F) _1568["high"] = _1578;
5431
+ const _1577 = _1578;
5432
+ if (_1577 === F) { c.idx = _1566; c.bindings = _1569; _1565 = F; break L_1567; }
5433
+ const _1580 = H[72](_1568, c);
5434
+ c.bindings = _1569;
5435
+ _1565 = _1580;
5436
+ }
5437
+ return _1565;
5317
5438
  }
5318
5439
 
5319
5440
  // LikeTail
5320
- R[62] = (c) => {
5321
-
5322
- let _1541;
5323
- L_1543: {
5324
- const _1542 = c.idx;
5325
- const _1545 = c.bindings;
5326
- const _1544 = {};
5327
- c.bindings = _1544;
5328
-
5329
- let _1547;
5330
- L_1548: {
5331
- const _1549 = c.tokens[c.idx];
5332
- if (_1549 === undefined) { if (c.track) { E(c, "Like"); E(c, "Ilike"); } _1547 = F; break L_1548; }
5333
- const _1550 = _1549.id !== undefined ? _1549.id : I[_1549.type];
5334
- switch (_1550) {
5441
+ R[63] = (c) => {
5442
+
5443
+ let _1581;
5444
+ L_1583: {
5445
+ const _1582 = c.idx;
5446
+ const _1585 = c.bindings;
5447
+ const _1584 = {};
5448
+ c.bindings = _1584;
5449
+
5450
+ let _1587;
5451
+ L_1588: {
5452
+ const _1589 = c.tokens[c.idx];
5453
+ if (_1589 === undefined) { if (c.track) { E(c, "Like"); E(c, "Ilike"); } _1587 = F; break L_1588; }
5454
+ const _1590 = _1589.id !== undefined ? _1589.id : I[_1589.type];
5455
+ switch (_1590) {
5335
5456
  case 15: {
5336
5457
 
5337
- let _1551;
5338
- L_1552: {
5339
- const _1553 = c.idx;
5340
- let _1554;
5341
- const _1555 = c.tokens[c.idx];
5342
- if (_1555 !== undefined && (_1555.id === 15 || (_1555.id === undefined && _1555.type === "Like"))) { c.idx++; _1554 = _1555; }
5343
- else { if (c.track) { E(c, "Like"); } _1554 = F; }
5344
- if (_1554 === F) { c.idx = _1553; _1551 = F; break L_1552; }
5345
- _1551 = "LIKE";
5458
+ let _1591;
5459
+ L_1592: {
5460
+ const _1593 = c.idx;
5461
+ let _1594;
5462
+ const _1595 = c.tokens[c.idx];
5463
+ if (_1595 !== undefined && (_1595.id === 15 || (_1595.id === undefined && _1595.type === "Like"))) { c.idx++; _1594 = _1595; }
5464
+ else { if (c.track) { E(c, "Like"); } _1594 = F; }
5465
+ if (_1594 === F) { c.idx = _1593; _1591 = F; break L_1592; }
5466
+ _1591 = "LIKE";
5346
5467
  }
5347
- _1547 = _1551; break L_1548;
5468
+ _1587 = _1591; break L_1588;
5348
5469
  }
5349
5470
  case 16: {
5350
5471
 
5351
- let _1556;
5352
- L_1557: {
5353
- const _1558 = c.idx;
5354
- let _1559;
5355
- const _1560 = c.tokens[c.idx];
5356
- if (_1560 !== undefined && (_1560.id === 16 || (_1560.id === undefined && _1560.type === "Ilike"))) { c.idx++; _1559 = _1560; }
5357
- else { if (c.track) { E(c, "Ilike"); } _1559 = F; }
5358
- if (_1559 === F) { c.idx = _1558; _1556 = F; break L_1557; }
5359
- _1556 = "ILIKE";
5472
+ let _1596;
5473
+ L_1597: {
5474
+ const _1598 = c.idx;
5475
+ let _1599;
5476
+ const _1600 = c.tokens[c.idx];
5477
+ if (_1600 !== undefined && (_1600.id === 16 || (_1600.id === undefined && _1600.type === "Ilike"))) { c.idx++; _1599 = _1600; }
5478
+ else { if (c.track) { E(c, "Ilike"); } _1599 = F; }
5479
+ if (_1599 === F) { c.idx = _1598; _1596 = F; break L_1597; }
5480
+ _1596 = "ILIKE";
5360
5481
  }
5361
- _1547 = _1556; break L_1548;
5482
+ _1587 = _1596; break L_1588;
5362
5483
  }
5363
- default: { if (c.track) { E(c, "Like"); E(c, "Ilike"); } _1547 = F; break L_1548; }
5484
+ default: { if (c.track) { E(c, "Like"); E(c, "Ilike"); } _1587 = F; break L_1588; }
5364
5485
  }
5365
5486
  }
5366
- if (_1547 !== F) _1544["op"] = _1547;
5367
- const _1546 = _1547;
5368
- if (_1546 === F) { c.idx = _1542; c.bindings = _1545; _1541 = F; break L_1543; }
5487
+ if (_1587 !== F) _1584["op"] = _1587;
5488
+ const _1586 = _1587;
5489
+ if (_1586 === F) { c.idx = _1582; c.bindings = _1585; _1581 = F; break L_1583; }
5369
5490
 
5370
- const _1563 = c.ruleDepth;
5371
- if (c.track) { c.ruleNames[_1563] = "ConcatExpr"; c.ruleDepth = _1563 + 1; }
5372
- const _1562 = R[55](c);
5373
- if (c.track) c.ruleDepth = _1563;
5374
- if (_1562 !== F) _1544["p"] = _1562;
5375
- const _1561 = _1562;
5376
- if (_1561 === F) { c.idx = _1542; c.bindings = _1545; _1541 = F; break L_1543; }
5377
- const _1564 = H[72](_1544, c);
5378
- c.bindings = _1545;
5379
- _1541 = _1564;
5491
+ const _1603 = c.ruleDepth;
5492
+ if (c.track) { c.ruleNames[_1603] = "ConcatExpr"; c.ruleDepth = _1603 + 1; }
5493
+ const _1602 = R[56](c);
5494
+ if (c.track) c.ruleDepth = _1603;
5495
+ if (_1602 !== F) _1584["p"] = _1602;
5496
+ const _1601 = _1602;
5497
+ if (_1601 === F) { c.idx = _1582; c.bindings = _1585; _1581 = F; break L_1583; }
5498
+ const _1604 = H[73](_1584, c);
5499
+ c.bindings = _1585;
5500
+ _1581 = _1604;
5380
5501
  }
5381
- return _1541;
5502
+ return _1581;
5382
5503
  }
5383
5504
 
5384
5505
  const RULES = {
@@ -5434,17 +5555,18 @@ const RULES = {
5434
5555
  "CaseExpr": 49,
5435
5556
  "CastExpr": 50,
5436
5557
  "ExtractExpr": 51,
5437
- "FunctionCall": 52,
5438
- "ColumnRef": 53,
5439
- "Param": 54,
5440
- "ConcatExpr": 55,
5441
- "PredicateTail": 56,
5442
- "WhenClause": 57,
5443
- "WindowSpec": 58,
5444
- "ConcatExpr$tower": 59,
5445
- "InTail": 60,
5446
- "BetweenTail": 61,
5447
- "LikeTail": 62
5558
+ "PivotExpr": 52,
5559
+ "FunctionCall": 53,
5560
+ "ColumnRef": 54,
5561
+ "Param": 55,
5562
+ "ConcatExpr": 56,
5563
+ "PredicateTail": 57,
5564
+ "WhenClause": 58,
5565
+ "WindowSpec": 59,
5566
+ "ConcatExpr$tower": 60,
5567
+ "InTail": 61,
5568
+ "BetweenTail": 62,
5569
+ "LikeTail": 63
5448
5570
  }
5449
5571
 
5450
5572
  /**