sqllang 0.0.3 → 0.0.5
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/dist/cjs/index.js +1442 -840
- package/dist/esm/index.js +1442 -840
- package/dist/esm/index.min.js +6 -6
- package/package.json +2 -2
- package/src/execute.js +126 -12
- package/src/index.js +28 -2
- package/src/parser.js +753 -82
package/dist/esm/index.js
CHANGED
|
@@ -523,8 +523,8 @@ var lexer = (() => {
|
|
|
523
523
|
const NAMES = tokens.map((t) => t.name);
|
|
524
524
|
const SKIP = tokens.map((t) => t.skip ? 1 : 0);
|
|
525
525
|
const DISPATCH = "\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0101\u0101\u0101\u0101\u0101\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0101\u0102\u0103\u0100\u0104\u0105\u0100\u0106\u0107\u0108\u0109\u010A\u010B\u010C\u010D\u010E\u010F\u010F\u010F\u010F\u010F\u010F\u010F\u010F\u010F\u010F\u0110\u0111\u0112\u0113\u0114\u0115\u0100\u0116\u0117\u0118\u0119\u011A\u011B\u011C\u011D\u011E\u011F\u0120\u0121\u0120\u0122\u0123\u0124\u0120\u0125\u0126\u0127\u0128\u0129\u012A\u0120\u0120\u0120\u012B\u0100\u012C\u0100\u0120\u012D\u0116\u0117\u0118\u0119\u011A\u011B\u011C\u011D\u011E\u011F\u0120\u0121\u0120\u0122\u0123\u0124\u0120\u0125\u0126\u0127\u0128\u0129\u012A\u0120\u0120\u0120\u0100\u012E\u0100\u0100\u0100\u0101";
|
|
526
|
-
const RX = [[0, "y"], [
|
|
527
|
-
const KW = [[[
|
|
526
|
+
const RX = [[0, "y"], [58, "y"], [2, "y"], [57, "iy"]].map(([i, flags]) => new RegExp(tokens[i].pattern, flags));
|
|
527
|
+
const KW = [[[112, 97, 114, 116, 105, 116, 105, 111, 110], [80, 65, 82, 84, 73, 84, 73, 79, 78]]];
|
|
528
528
|
const look0 = (c) => c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122;
|
|
529
529
|
function scanKeyword(text, offset, length, lower, upper, look) {
|
|
530
530
|
const n = lower.length;
|
|
@@ -574,885 +574,1428 @@ var lexer = (() => {
|
|
|
574
574
|
j += 2;
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
577
|
+
let dfaId = 0;
|
|
578
|
+
const isNaWs = (c) => c === 160 || c === 5760 || c >= 8192 && c <= 8202 || c === 8232 || c === 8233 || c === 8239 || c === 8287 || c === 12288 || c === 65279;
|
|
579
|
+
const symOf = (c) => c < 128 ? c : isNaWs(c) ? 129 : 128;
|
|
580
|
+
const is0 = (c) => c === 36;
|
|
581
|
+
const is1 = (c) => c >= 48 && c <= 57;
|
|
582
|
+
const is2 = (c) => c === 58;
|
|
583
|
+
const is3 = (c) => c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122;
|
|
584
|
+
const is4 = (c) => c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122;
|
|
585
|
+
const is5 = (c) => c === 96;
|
|
586
|
+
const is6 = (c) => c >= 0 && c <= 95 || c >= 97 && c <= 127 || c >= 128;
|
|
587
|
+
const is7 = (c) => c === 80 || c === 112;
|
|
588
|
+
const is8 = (c) => c === 73 || c === 105;
|
|
589
|
+
const is9 = (c) => c === 86 || c === 118;
|
|
590
|
+
const is10 = (c) => c === 79 || c === 111;
|
|
591
|
+
const is11 = (c) => c === 84 || c === 116;
|
|
592
|
+
const skip1 = (text, i, length) => {
|
|
593
|
+
while (i + 1 < length && is1(text.charCodeAt(i + 1))) i++;
|
|
594
|
+
return i;
|
|
595
|
+
};
|
|
596
|
+
const skip4 = (text, i, length) => {
|
|
597
|
+
while (i + 1 < length && is4(text.charCodeAt(i + 1))) i++;
|
|
598
|
+
return i;
|
|
599
|
+
};
|
|
600
|
+
const skip6 = (text, i, length) => {
|
|
601
|
+
while (i + 1 < length && is6(text.charCodeAt(i + 1))) i++;
|
|
602
|
+
return i;
|
|
603
|
+
};
|
|
604
|
+
const G0 = [63];
|
|
605
|
+
function dfa0(text, offset, length) {
|
|
606
|
+
let state = 1;
|
|
607
|
+
let winner = -1;
|
|
608
|
+
let end = -1;
|
|
609
|
+
let i = offset;
|
|
610
|
+
loop: for (; i < length; ) {
|
|
611
|
+
const c = text.charCodeAt(i);
|
|
612
|
+
switch (state) {
|
|
613
|
+
case 1:
|
|
614
|
+
if (is0(c)) {
|
|
615
|
+
state = 2;
|
|
616
|
+
} else break loop;
|
|
617
|
+
break;
|
|
618
|
+
case 2:
|
|
619
|
+
if (is1(c)) {
|
|
620
|
+
state = 3;
|
|
621
|
+
} else break loop;
|
|
622
|
+
break;
|
|
623
|
+
case 3:
|
|
624
|
+
if (is1(c)) {
|
|
625
|
+
i = skip1(text, i, length);
|
|
626
|
+
} else break loop;
|
|
627
|
+
break;
|
|
628
|
+
}
|
|
629
|
+
i++;
|
|
630
|
+
switch (state) {
|
|
631
|
+
case 3:
|
|
632
|
+
if (winner === -1 || 0 < winner) {
|
|
633
|
+
winner = 0;
|
|
634
|
+
end = i;
|
|
635
|
+
} else if (winner === 0 && i > end) end = i;
|
|
636
|
+
break;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
if (winner === -1) return -1;
|
|
640
|
+
dfaId = G0[winner];
|
|
641
|
+
return end;
|
|
642
|
+
}
|
|
643
|
+
const G1 = [67];
|
|
644
|
+
function dfa1(text, offset, length) {
|
|
645
|
+
let state = 1;
|
|
646
|
+
let winner = -1;
|
|
647
|
+
let end = -1;
|
|
648
|
+
let i = offset;
|
|
649
|
+
loop: for (; i < length; ) {
|
|
650
|
+
const c = text.charCodeAt(i);
|
|
651
|
+
switch (state) {
|
|
652
|
+
case 1:
|
|
653
|
+
if (is2(c)) {
|
|
654
|
+
state = 2;
|
|
655
|
+
} else break loop;
|
|
656
|
+
break;
|
|
657
|
+
case 2:
|
|
658
|
+
if (is3(c)) {
|
|
659
|
+
state = 3;
|
|
660
|
+
} else break loop;
|
|
661
|
+
break;
|
|
662
|
+
case 3:
|
|
663
|
+
if (is4(c)) {
|
|
664
|
+
i = skip4(text, i, length);
|
|
665
|
+
} else break loop;
|
|
666
|
+
break;
|
|
667
|
+
}
|
|
668
|
+
i++;
|
|
669
|
+
switch (state) {
|
|
670
|
+
case 3:
|
|
671
|
+
if (winner === -1 || 0 < winner) {
|
|
672
|
+
winner = 0;
|
|
673
|
+
end = i;
|
|
674
|
+
} else if (winner === 0 && i > end) end = i;
|
|
675
|
+
break;
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
if (winner === -1) return -1;
|
|
679
|
+
dfaId = G1[winner];
|
|
680
|
+
return end;
|
|
681
|
+
}
|
|
682
|
+
const G2 = [61];
|
|
683
|
+
function dfa2(text, offset, length) {
|
|
684
|
+
let state = 1;
|
|
685
|
+
let winner = -1;
|
|
686
|
+
let end = -1;
|
|
687
|
+
let i = offset;
|
|
688
|
+
loop: for (; i < length; ) {
|
|
689
|
+
const c = text.charCodeAt(i);
|
|
690
|
+
switch (state) {
|
|
691
|
+
case 1:
|
|
692
|
+
if (is5(c)) {
|
|
693
|
+
state = 2;
|
|
694
|
+
} else break loop;
|
|
695
|
+
break;
|
|
696
|
+
case 2:
|
|
697
|
+
if (is6(c)) {
|
|
698
|
+
i = skip6(text, i, length);
|
|
699
|
+
} else if (is5(c)) {
|
|
700
|
+
state = 3;
|
|
701
|
+
} else break loop;
|
|
702
|
+
break;
|
|
703
|
+
case 3:
|
|
704
|
+
break loop;
|
|
705
|
+
}
|
|
706
|
+
i++;
|
|
707
|
+
switch (state) {
|
|
708
|
+
case 3:
|
|
709
|
+
if (winner === -1 || 0 < winner) {
|
|
710
|
+
winner = 0;
|
|
711
|
+
end = i;
|
|
712
|
+
} else if (winner === 0 && i > end) end = i;
|
|
713
|
+
break;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
if (winner === -1) return -1;
|
|
717
|
+
dfaId = G2[winner];
|
|
718
|
+
return end;
|
|
719
|
+
}
|
|
720
|
+
let calls3 = 0;
|
|
721
|
+
let passes3 = 0;
|
|
722
|
+
let off3 = false;
|
|
723
|
+
function dfa3(text, offset, length) {
|
|
724
|
+
let state = 1;
|
|
725
|
+
let mask = 0;
|
|
726
|
+
let i = offset;
|
|
727
|
+
loop: for (; i < length; ) {
|
|
728
|
+
const c = text.charCodeAt(i);
|
|
729
|
+
switch (state) {
|
|
730
|
+
case 1:
|
|
731
|
+
if (is7(c)) {
|
|
732
|
+
state = 2;
|
|
733
|
+
} else break loop;
|
|
734
|
+
break;
|
|
735
|
+
case 2:
|
|
736
|
+
if (is8(c)) {
|
|
737
|
+
state = 3;
|
|
738
|
+
} else break loop;
|
|
739
|
+
break;
|
|
740
|
+
case 3:
|
|
741
|
+
if (is9(c)) {
|
|
742
|
+
state = 4;
|
|
743
|
+
} else break loop;
|
|
744
|
+
break;
|
|
745
|
+
case 4:
|
|
746
|
+
if (is10(c)) {
|
|
747
|
+
state = 5;
|
|
748
|
+
} else break loop;
|
|
749
|
+
break;
|
|
750
|
+
case 5:
|
|
751
|
+
if (is11(c)) {
|
|
752
|
+
state = 6;
|
|
753
|
+
} else break loop;
|
|
754
|
+
break;
|
|
755
|
+
case 6:
|
|
756
|
+
break loop;
|
|
757
|
+
}
|
|
758
|
+
i++;
|
|
759
|
+
switch (state) {
|
|
760
|
+
case 6:
|
|
761
|
+
mask |= 1;
|
|
762
|
+
break;
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
return mask;
|
|
766
|
+
}
|
|
767
|
+
let wordId = 0;
|
|
768
|
+
function word0(text, offset, length) {
|
|
769
|
+
let c = text.charCodeAt(offset);
|
|
770
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
771
|
+
let h = 0;
|
|
772
|
+
let j = offset;
|
|
773
|
+
while (j < length) {
|
|
774
|
+
c = text.charCodeAt(j);
|
|
775
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
776
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
777
|
+
h = Math.imul(h, 31) + c | 0;
|
|
778
|
+
j++;
|
|
779
|
+
}
|
|
780
|
+
const len = j - offset;
|
|
781
|
+
if (len > 0) {
|
|
782
|
+
switch (h) {
|
|
783
|
+
case 3122:
|
|
784
|
+
if (len === 2 && ((c = text.charCodeAt(offset + 0)) === 97 || c === 65) && ((c = text.charCodeAt(offset + 1)) === 115 || c === 83)) {
|
|
785
|
+
wordId = 6;
|
|
786
|
+
return j;
|
|
611
787
|
}
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
break found;
|
|
618
|
-
}
|
|
619
|
-
break;
|
|
788
|
+
break;
|
|
789
|
+
case 96673:
|
|
790
|
+
if (len === 3 && ((c = text.charCodeAt(offset + 0)) === 97 || c === 65) && ((c = text.charCodeAt(offset + 1)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 2)) === 108 || c === 76)) {
|
|
791
|
+
wordId = 8;
|
|
792
|
+
return j;
|
|
620
793
|
}
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
end = e;
|
|
627
|
-
matched = null;
|
|
628
|
-
break found;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
break;
|
|
794
|
+
break;
|
|
795
|
+
case 96727:
|
|
796
|
+
if (len === 3 && ((c = text.charCodeAt(offset + 0)) === 97 || c === 65) && ((c = text.charCodeAt(offset + 1)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 2)) === 100 || c === 68)) {
|
|
797
|
+
wordId = 9;
|
|
798
|
+
return j;
|
|
632
799
|
}
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
matched = m[0];
|
|
639
|
-
end = offset + matched.length;
|
|
640
|
-
break found;
|
|
641
|
-
}
|
|
642
|
-
break;
|
|
800
|
+
break;
|
|
801
|
+
case 96881:
|
|
802
|
+
if (len === 3 && ((c = text.charCodeAt(offset + 0)) === 97 || c === 65) && ((c = text.charCodeAt(offset + 1)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 2)) === 99 || c === 67)) {
|
|
803
|
+
wordId = 30;
|
|
804
|
+
return j;
|
|
643
805
|
}
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
806
|
+
break;
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
if (j === offset) j++;
|
|
810
|
+
while (j < length) {
|
|
811
|
+
c = text.charCodeAt(j);
|
|
812
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
813
|
+
j++;
|
|
814
|
+
}
|
|
815
|
+
wordId = 62;
|
|
816
|
+
return j;
|
|
817
|
+
}
|
|
818
|
+
function word1(text, offset, length) {
|
|
819
|
+
let c = text.charCodeAt(offset);
|
|
820
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
821
|
+
let h = 0;
|
|
822
|
+
let j = offset;
|
|
823
|
+
while (j < length) {
|
|
824
|
+
c = text.charCodeAt(j);
|
|
825
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
826
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
827
|
+
h = Math.imul(h, 31) + c | 0;
|
|
828
|
+
j++;
|
|
829
|
+
}
|
|
830
|
+
const len = j - offset;
|
|
831
|
+
if (len > 0) {
|
|
832
|
+
switch (h) {
|
|
833
|
+
case -216634360:
|
|
834
|
+
if (len === 7 && ((c = text.charCodeAt(offset + 0)) === 98 || c === 66) && ((c = text.charCodeAt(offset + 1)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 2)) === 116 || c === 84) && ((c = text.charCodeAt(offset + 3)) === 119 || c === 87) && ((c = text.charCodeAt(offset + 4)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 5)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 6)) === 110 || c === 78)) {
|
|
835
|
+
wordId = 17;
|
|
836
|
+
return j;
|
|
652
837
|
}
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
end = e;
|
|
659
|
-
matched = null;
|
|
660
|
-
break found;
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
break;
|
|
838
|
+
break;
|
|
839
|
+
case 3159:
|
|
840
|
+
if (len === 2 && ((c = text.charCodeAt(offset + 0)) === 98 || c === 66) && ((c = text.charCodeAt(offset + 1)) === 121 || c === 89)) {
|
|
841
|
+
wordId = 28;
|
|
842
|
+
return j;
|
|
664
843
|
}
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
844
|
+
break;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
if (j === offset) j++;
|
|
848
|
+
while (j < length) {
|
|
849
|
+
c = text.charCodeAt(j);
|
|
850
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
851
|
+
j++;
|
|
852
|
+
}
|
|
853
|
+
wordId = 62;
|
|
854
|
+
return j;
|
|
855
|
+
}
|
|
856
|
+
function word2(text, offset, length) {
|
|
857
|
+
let c = text.charCodeAt(offset);
|
|
858
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
859
|
+
let h = 0;
|
|
860
|
+
let j = offset;
|
|
861
|
+
while (j < length) {
|
|
862
|
+
c = text.charCodeAt(j);
|
|
863
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
864
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
865
|
+
h = Math.imul(h, 31) + c | 0;
|
|
866
|
+
j++;
|
|
867
|
+
}
|
|
868
|
+
const len = j - offset;
|
|
869
|
+
if (len > 0) {
|
|
870
|
+
switch (h) {
|
|
871
|
+
case 94935104:
|
|
872
|
+
if (len === 5 && ((c = text.charCodeAt(offset + 0)) === 99 || c === 67) && ((c = text.charCodeAt(offset + 1)) === 114 || c === 82) && ((c = text.charCodeAt(offset + 2)) === 111 || c === 79) && ((c = text.charCodeAt(offset + 3)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 4)) === 115 || c === 83)) {
|
|
873
|
+
wordId = 23;
|
|
874
|
+
return j;
|
|
673
875
|
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
break found;
|
|
680
|
-
}
|
|
681
|
-
break;
|
|
876
|
+
break;
|
|
877
|
+
case 3046192:
|
|
878
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 99 || c === 67) && ((c = text.charCodeAt(offset + 1)) === 97 || c === 65) && ((c = text.charCodeAt(offset + 2)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 3)) === 101 || c === 69)) {
|
|
879
|
+
wordId = 41;
|
|
880
|
+
return j;
|
|
682
881
|
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
882
|
+
break;
|
|
883
|
+
case 3046207:
|
|
884
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 99 || c === 67) && ((c = text.charCodeAt(offset + 1)) === 97 || c === 65) && ((c = text.charCodeAt(offset + 2)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 3)) === 116 || c === 84)) {
|
|
885
|
+
wordId = 51;
|
|
886
|
+
return j;
|
|
887
|
+
}
|
|
888
|
+
break;
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
if (j === offset) j++;
|
|
892
|
+
while (j < length) {
|
|
893
|
+
c = text.charCodeAt(j);
|
|
894
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
895
|
+
j++;
|
|
896
|
+
}
|
|
897
|
+
wordId = 62;
|
|
898
|
+
return j;
|
|
899
|
+
}
|
|
900
|
+
function word3(text, offset, length) {
|
|
901
|
+
let c = text.charCodeAt(offset);
|
|
902
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
903
|
+
let h = 0;
|
|
904
|
+
let j = offset;
|
|
905
|
+
while (j < length) {
|
|
906
|
+
c = text.charCodeAt(j);
|
|
907
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
908
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
909
|
+
h = Math.imul(h, 31) + c | 0;
|
|
910
|
+
j++;
|
|
911
|
+
}
|
|
912
|
+
const len = j - offset;
|
|
913
|
+
if (len > 0) {
|
|
914
|
+
switch (h) {
|
|
915
|
+
case 288698108:
|
|
916
|
+
if (len === 8 && ((c = text.charCodeAt(offset + 0)) === 100 || c === 68) && ((c = text.charCodeAt(offset + 1)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 2)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 3)) === 116 || c === 84) && ((c = text.charCodeAt(offset + 4)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 5)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 6)) === 99 || c === 67) && ((c = text.charCodeAt(offset + 7)) === 116 || c === 84)) {
|
|
917
|
+
wordId = 7;
|
|
918
|
+
return j;
|
|
919
|
+
}
|
|
920
|
+
break;
|
|
921
|
+
case 3079825:
|
|
922
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 100 || c === 68) && ((c = text.charCodeAt(offset + 1)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 2)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 3)) === 99 || c === 67)) {
|
|
923
|
+
wordId = 31;
|
|
924
|
+
return j;
|
|
925
|
+
}
|
|
926
|
+
break;
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
if (j === offset) j++;
|
|
930
|
+
while (j < length) {
|
|
931
|
+
c = text.charCodeAt(j);
|
|
932
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
933
|
+
j++;
|
|
934
|
+
}
|
|
935
|
+
wordId = 62;
|
|
936
|
+
return j;
|
|
937
|
+
}
|
|
938
|
+
function word4(text, offset, length) {
|
|
939
|
+
let c = text.charCodeAt(offset);
|
|
940
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
941
|
+
let h = 0;
|
|
942
|
+
let j = offset;
|
|
943
|
+
while (j < length) {
|
|
944
|
+
c = text.charCodeAt(j);
|
|
945
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
946
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
947
|
+
h = Math.imul(h, 31) + c | 0;
|
|
948
|
+
j++;
|
|
949
|
+
}
|
|
950
|
+
const len = j - offset;
|
|
951
|
+
if (len > 0) {
|
|
952
|
+
switch (h) {
|
|
953
|
+
case 3116345:
|
|
954
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 1)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 2)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 3)) === 101 || c === 69)) {
|
|
955
|
+
wordId = 44;
|
|
956
|
+
return j;
|
|
957
|
+
}
|
|
958
|
+
break;
|
|
959
|
+
case 100571:
|
|
960
|
+
if (len === 3 && ((c = text.charCodeAt(offset + 0)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 1)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 2)) === 100 || c === 68)) {
|
|
961
|
+
wordId = 45;
|
|
962
|
+
return j;
|
|
963
|
+
}
|
|
964
|
+
break;
|
|
965
|
+
case -1289550567:
|
|
966
|
+
if (len === 6 && ((c = text.charCodeAt(offset + 0)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 1)) === 120 || c === 88) && ((c = text.charCodeAt(offset + 2)) === 99 || c === 67) && ((c = text.charCodeAt(offset + 3)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 4)) === 112 || c === 80) && ((c = text.charCodeAt(offset + 5)) === 116 || c === 84)) {
|
|
967
|
+
wordId = 48;
|
|
968
|
+
return j;
|
|
969
|
+
}
|
|
970
|
+
break;
|
|
971
|
+
case -1289358244:
|
|
972
|
+
if (len === 6 && ((c = text.charCodeAt(offset + 0)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 1)) === 120 || c === 88) && ((c = text.charCodeAt(offset + 2)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 3)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 4)) === 116 || c === 84) && ((c = text.charCodeAt(offset + 5)) === 115 || c === 83)) {
|
|
973
|
+
wordId = 50;
|
|
974
|
+
return j;
|
|
975
|
+
}
|
|
976
|
+
break;
|
|
977
|
+
case -1305289599:
|
|
978
|
+
if (len === 7 && ((c = text.charCodeAt(offset + 0)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 1)) === 120 || c === 88) && ((c = text.charCodeAt(offset + 2)) === 116 || c === 84) && ((c = text.charCodeAt(offset + 3)) === 114 || c === 82) && ((c = text.charCodeAt(offset + 4)) === 97 || c === 65) && ((c = text.charCodeAt(offset + 5)) === 99 || c === 67) && ((c = text.charCodeAt(offset + 6)) === 116 || c === 84)) {
|
|
979
|
+
wordId = 52;
|
|
980
|
+
return j;
|
|
981
|
+
}
|
|
982
|
+
break;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
if (j === offset) j++;
|
|
986
|
+
while (j < length) {
|
|
987
|
+
c = text.charCodeAt(j);
|
|
988
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
989
|
+
j++;
|
|
990
|
+
}
|
|
991
|
+
wordId = 62;
|
|
992
|
+
return j;
|
|
993
|
+
}
|
|
994
|
+
function word5(text, offset, length) {
|
|
995
|
+
let c = text.charCodeAt(offset);
|
|
996
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
997
|
+
let h = 0;
|
|
998
|
+
let j = offset;
|
|
999
|
+
while (j < length) {
|
|
1000
|
+
c = text.charCodeAt(j);
|
|
1001
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1002
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1003
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1004
|
+
j++;
|
|
1005
|
+
}
|
|
1006
|
+
const len = j - offset;
|
|
1007
|
+
if (len > 0) {
|
|
1008
|
+
switch (h) {
|
|
1009
|
+
case 3151786:
|
|
1010
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 102 || c === 70) && ((c = text.charCodeAt(offset + 1)) === 114 || c === 82) && ((c = text.charCodeAt(offset + 2)) === 111 || c === 79) && ((c = text.charCodeAt(offset + 3)) === 109 || c === 77)) {
|
|
1011
|
+
wordId = 4;
|
|
1012
|
+
return j;
|
|
1013
|
+
}
|
|
1014
|
+
break;
|
|
1015
|
+
case 3154575:
|
|
1016
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 102 || c === 70) && ((c = text.charCodeAt(offset + 1)) === 117 || c === 85) && ((c = text.charCodeAt(offset + 2)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 3)) === 108 || c === 76)) {
|
|
1017
|
+
wordId = 21;
|
|
1018
|
+
return j;
|
|
1019
|
+
}
|
|
1020
|
+
break;
|
|
1021
|
+
case 97196323:
|
|
1022
|
+
if (len === 5 && ((c = text.charCodeAt(offset + 0)) === 102 || c === 70) && ((c = text.charCodeAt(offset + 1)) === 97 || c === 65) && ((c = text.charCodeAt(offset + 2)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 3)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 4)) === 101 || c === 69)) {
|
|
1023
|
+
wordId = 40;
|
|
1024
|
+
return j;
|
|
1025
|
+
}
|
|
1026
|
+
break;
|
|
1027
|
+
case -1274492040:
|
|
1028
|
+
if (len === 6 && ((c = text.charCodeAt(offset + 0)) === 102 || c === 70) && ((c = text.charCodeAt(offset + 1)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 2)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 3)) === 116 || c === 84) && ((c = text.charCodeAt(offset + 4)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 5)) === 114 || c === 82)) {
|
|
1029
|
+
wordId = 55;
|
|
1030
|
+
return j;
|
|
1031
|
+
}
|
|
1032
|
+
break;
|
|
1033
|
+
case 101577:
|
|
1034
|
+
if (len === 3 && ((c = text.charCodeAt(offset + 0)) === 102 || c === 70) && ((c = text.charCodeAt(offset + 1)) === 111 || c === 79) && ((c = text.charCodeAt(offset + 2)) === 114 || c === 82)) {
|
|
1035
|
+
wordId = 56;
|
|
1036
|
+
return j;
|
|
1037
|
+
}
|
|
1038
|
+
break;
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
if (j === offset) j++;
|
|
1042
|
+
while (j < length) {
|
|
1043
|
+
c = text.charCodeAt(j);
|
|
1044
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1045
|
+
j++;
|
|
1046
|
+
}
|
|
1047
|
+
wordId = 62;
|
|
1048
|
+
return j;
|
|
1049
|
+
}
|
|
1050
|
+
function word6(text, offset, length) {
|
|
1051
|
+
let c = text.charCodeAt(offset);
|
|
1052
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
1053
|
+
let h = 0;
|
|
1054
|
+
let j = offset;
|
|
1055
|
+
while (j < length) {
|
|
1056
|
+
c = text.charCodeAt(j);
|
|
1057
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1058
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1059
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1060
|
+
j++;
|
|
1061
|
+
}
|
|
1062
|
+
const len = j - offset;
|
|
1063
|
+
if (len > 0) {
|
|
1064
|
+
switch (h) {
|
|
1065
|
+
case 98629247:
|
|
1066
|
+
if (len === 5 && ((c = text.charCodeAt(offset + 0)) === 103 || c === 71) && ((c = text.charCodeAt(offset + 1)) === 114 || c === 82) && ((c = text.charCodeAt(offset + 2)) === 111 || c === 79) && ((c = text.charCodeAt(offset + 3)) === 117 || c === 85) && ((c = text.charCodeAt(offset + 4)) === 112 || c === 80)) {
|
|
1067
|
+
wordId = 27;
|
|
1068
|
+
return j;
|
|
1069
|
+
}
|
|
1070
|
+
break;
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
if (j === offset) j++;
|
|
1074
|
+
while (j < length) {
|
|
1075
|
+
c = text.charCodeAt(j);
|
|
1076
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1077
|
+
j++;
|
|
1078
|
+
}
|
|
1079
|
+
wordId = 62;
|
|
1080
|
+
return j;
|
|
1081
|
+
}
|
|
1082
|
+
function word7(text, offset, length) {
|
|
1083
|
+
let c = text.charCodeAt(offset);
|
|
1084
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
1085
|
+
let h = 0;
|
|
1086
|
+
let j = offset;
|
|
1087
|
+
while (j < length) {
|
|
1088
|
+
c = text.charCodeAt(j);
|
|
1089
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1090
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1091
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1092
|
+
j++;
|
|
1093
|
+
}
|
|
1094
|
+
const len = j - offset;
|
|
1095
|
+
if (len > 0) {
|
|
1096
|
+
switch (h) {
|
|
1097
|
+
case -1224334299:
|
|
1098
|
+
if (len === 6 && ((c = text.charCodeAt(offset + 0)) === 104 || c === 72) && ((c = text.charCodeAt(offset + 1)) === 97 || c === 65) && ((c = text.charCodeAt(offset + 2)) === 118 || c === 86) && ((c = text.charCodeAt(offset + 3)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 4)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 5)) === 103 || c === 71)) {
|
|
1099
|
+
wordId = 33;
|
|
1100
|
+
return j;
|
|
1101
|
+
}
|
|
1102
|
+
break;
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
if (j === offset) j++;
|
|
1106
|
+
while (j < length) {
|
|
1107
|
+
c = text.charCodeAt(j);
|
|
1108
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1109
|
+
j++;
|
|
1110
|
+
}
|
|
1111
|
+
wordId = 62;
|
|
1112
|
+
return j;
|
|
1113
|
+
}
|
|
1114
|
+
function word8(text, offset, length) {
|
|
1115
|
+
let c = text.charCodeAt(offset);
|
|
1116
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
1117
|
+
let h = 0;
|
|
1118
|
+
let j = offset;
|
|
1119
|
+
while (j < length) {
|
|
1120
|
+
c = text.charCodeAt(j);
|
|
1121
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1122
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1123
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1124
|
+
j++;
|
|
1125
|
+
}
|
|
1126
|
+
const len = j - offset;
|
|
1127
|
+
if (len > 0) {
|
|
1128
|
+
switch (h) {
|
|
1129
|
+
case 3365:
|
|
1130
|
+
if (len === 2 && ((c = text.charCodeAt(offset + 0)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 1)) === 110 || c === 78)) {
|
|
1131
|
+
wordId = 12;
|
|
1132
|
+
return j;
|
|
1133
|
+
}
|
|
1134
|
+
break;
|
|
1135
|
+
case 3370:
|
|
1136
|
+
if (len === 2 && ((c = text.charCodeAt(offset + 0)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 1)) === 115 || c === 83)) {
|
|
1137
|
+
wordId = 13;
|
|
1138
|
+
return j;
|
|
1139
|
+
}
|
|
1140
|
+
break;
|
|
1141
|
+
case 100291456:
|
|
1142
|
+
if (len === 5 && ((c = text.charCodeAt(offset + 0)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 1)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 2)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 3)) === 107 || c === 75) && ((c = text.charCodeAt(offset + 4)) === 101 || c === 69)) {
|
|
1143
|
+
wordId = 16;
|
|
1144
|
+
return j;
|
|
1145
|
+
}
|
|
1146
|
+
break;
|
|
1147
|
+
case 100355670:
|
|
1148
|
+
if (len === 5 && ((c = text.charCodeAt(offset + 0)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 1)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 2)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 3)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 4)) === 114 || c === 82)) {
|
|
1149
|
+
wordId = 18;
|
|
1150
|
+
return j;
|
|
1151
|
+
}
|
|
1152
|
+
break;
|
|
1153
|
+
case -1183792455:
|
|
1154
|
+
if (len === 6 && ((c = text.charCodeAt(offset + 0)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 1)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 2)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 3)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 4)) === 114 || c === 82) && ((c = text.charCodeAt(offset + 5)) === 116 || c === 84)) {
|
|
1155
|
+
wordId = 36;
|
|
1156
|
+
return j;
|
|
1157
|
+
}
|
|
1158
|
+
break;
|
|
1159
|
+
case 3237472:
|
|
1160
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 1)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 2)) === 116 || c === 84) && ((c = text.charCodeAt(offset + 3)) === 111 || c === 79)) {
|
|
1161
|
+
wordId = 37;
|
|
1162
|
+
return j;
|
|
1163
|
+
}
|
|
1164
|
+
break;
|
|
1165
|
+
case 503014687:
|
|
1166
|
+
if (len === 9 && ((c = text.charCodeAt(offset + 0)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 1)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 2)) === 116 || c === 84) && ((c = text.charCodeAt(offset + 3)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 4)) === 114 || c === 82) && ((c = text.charCodeAt(offset + 5)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 6)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 7)) === 99 || c === 67) && ((c = text.charCodeAt(offset + 8)) === 116 || c === 84)) {
|
|
1167
|
+
wordId = 49;
|
|
1168
|
+
return j;
|
|
1169
|
+
}
|
|
1170
|
+
break;
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
if (j === offset) j++;
|
|
1174
|
+
while (j < length) {
|
|
1175
|
+
c = text.charCodeAt(j);
|
|
1176
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1177
|
+
j++;
|
|
1178
|
+
}
|
|
1179
|
+
wordId = 62;
|
|
1180
|
+
return j;
|
|
1181
|
+
}
|
|
1182
|
+
function word9(text, offset, length) {
|
|
1183
|
+
let c = text.charCodeAt(offset);
|
|
1184
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
1185
|
+
let h = 0;
|
|
1186
|
+
let j = offset;
|
|
1187
|
+
while (j < length) {
|
|
1188
|
+
c = text.charCodeAt(j);
|
|
1189
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1190
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1191
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1192
|
+
j++;
|
|
1193
|
+
}
|
|
1194
|
+
const len = j - offset;
|
|
1195
|
+
if (len > 0) {
|
|
1196
|
+
switch (h) {
|
|
1197
|
+
case 3267882:
|
|
1198
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 106 || c === 74) && ((c = text.charCodeAt(offset + 1)) === 111 || c === 79) && ((c = text.charCodeAt(offset + 2)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 3)) === 110 || c === 78)) {
|
|
1199
|
+
wordId = 24;
|
|
1200
|
+
return j;
|
|
1201
|
+
}
|
|
1202
|
+
break;
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
if (j === offset) j++;
|
|
1206
|
+
while (j < length) {
|
|
1207
|
+
c = text.charCodeAt(j);
|
|
1208
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1209
|
+
j++;
|
|
1210
|
+
}
|
|
1211
|
+
wordId = 62;
|
|
1212
|
+
return j;
|
|
1213
|
+
}
|
|
1214
|
+
function word10(text, offset, length) {
|
|
1215
|
+
let c = text.charCodeAt(offset);
|
|
1216
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
1217
|
+
let h = 0;
|
|
1218
|
+
let j = offset;
|
|
1219
|
+
while (j < length) {
|
|
1220
|
+
c = text.charCodeAt(j);
|
|
1221
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1222
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1223
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1224
|
+
j++;
|
|
1225
|
+
}
|
|
1226
|
+
const len = j - offset;
|
|
1227
|
+
if (len > 0) {
|
|
1228
|
+
switch (h) {
|
|
1229
|
+
case 3321751:
|
|
1230
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 1)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 2)) === 107 || c === 75) && ((c = text.charCodeAt(offset + 3)) === 101 || c === 69)) {
|
|
1231
|
+
wordId = 15;
|
|
1232
|
+
return j;
|
|
691
1233
|
}
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
break found;
|
|
698
|
-
}
|
|
699
|
-
break;
|
|
1234
|
+
break;
|
|
1235
|
+
case 3317767:
|
|
1236
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 1)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 2)) === 102 || c === 70) && ((c = text.charCodeAt(offset + 3)) === 116 || c === 84)) {
|
|
1237
|
+
wordId = 19;
|
|
1238
|
+
return j;
|
|
700
1239
|
}
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
break found;
|
|
707
|
-
}
|
|
708
|
-
break;
|
|
1240
|
+
break;
|
|
1241
|
+
case 102976443:
|
|
1242
|
+
if (len === 5 && ((c = text.charCodeAt(offset + 0)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 1)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 2)) === 109 || c === 77) && ((c = text.charCodeAt(offset + 3)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 4)) === 116 || c === 84)) {
|
|
1243
|
+
wordId = 34;
|
|
1244
|
+
return j;
|
|
709
1245
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
break;
|
|
1246
|
+
break;
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1249
|
+
if (j === offset) j++;
|
|
1250
|
+
while (j < length) {
|
|
1251
|
+
c = text.charCodeAt(j);
|
|
1252
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1253
|
+
j++;
|
|
1254
|
+
}
|
|
1255
|
+
wordId = 62;
|
|
1256
|
+
return j;
|
|
1257
|
+
}
|
|
1258
|
+
function word11(text, offset, length) {
|
|
1259
|
+
let c = text.charCodeAt(offset);
|
|
1260
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
1261
|
+
let h = 0;
|
|
1262
|
+
let j = offset;
|
|
1263
|
+
while (j < length) {
|
|
1264
|
+
c = text.charCodeAt(j);
|
|
1265
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1266
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1267
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1268
|
+
j++;
|
|
1269
|
+
}
|
|
1270
|
+
const len = j - offset;
|
|
1271
|
+
if (len > 0) {
|
|
1272
|
+
switch (h) {
|
|
1273
|
+
case 109267:
|
|
1274
|
+
if (len === 3 && ((c = text.charCodeAt(offset + 0)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 1)) === 111 || c === 79) && ((c = text.charCodeAt(offset + 2)) === 116 || c === 84)) {
|
|
1275
|
+
wordId = 11;
|
|
1276
|
+
return j;
|
|
742
1277
|
}
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
matched = m[0];
|
|
749
|
-
end = offset + matched.length;
|
|
750
|
-
break found;
|
|
751
|
-
}
|
|
752
|
-
if (code2 === 46) {
|
|
753
|
-
id = 87;
|
|
754
|
-
end = offset + 1;
|
|
755
|
-
matched = ".";
|
|
756
|
-
break found;
|
|
757
|
-
}
|
|
758
|
-
break;
|
|
1278
|
+
break;
|
|
1279
|
+
case 3392903:
|
|
1280
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 1)) === 117 || c === 85) && ((c = text.charCodeAt(offset + 2)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 3)) === 108 || c === 76)) {
|
|
1281
|
+
wordId = 14;
|
|
1282
|
+
return j;
|
|
759
1283
|
}
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
matched = null;
|
|
766
|
-
break found;
|
|
767
|
-
}
|
|
768
|
-
if (code2 === 47) {
|
|
769
|
-
id = 80;
|
|
770
|
-
end = offset + 1;
|
|
771
|
-
matched = "/";
|
|
772
|
-
break found;
|
|
773
|
-
}
|
|
774
|
-
break;
|
|
1284
|
+
break;
|
|
1285
|
+
case 105180108:
|
|
1286
|
+
if (len === 5 && ((c = text.charCodeAt(offset + 0)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 1)) === 117 || c === 85) && ((c = text.charCodeAt(offset + 2)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 3)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 4)) === 115 || c === 83)) {
|
|
1287
|
+
wordId = 32;
|
|
1288
|
+
return j;
|
|
775
1289
|
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
1290
|
+
break;
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
if (j === offset) j++;
|
|
1294
|
+
while (j < length) {
|
|
1295
|
+
c = text.charCodeAt(j);
|
|
1296
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1297
|
+
j++;
|
|
1298
|
+
}
|
|
1299
|
+
wordId = 62;
|
|
1300
|
+
return j;
|
|
1301
|
+
}
|
|
1302
|
+
function word12(text, offset, length) {
|
|
1303
|
+
let c = text.charCodeAt(offset);
|
|
1304
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
1305
|
+
let h = 0;
|
|
1306
|
+
let j = offset;
|
|
1307
|
+
while (j < length) {
|
|
1308
|
+
c = text.charCodeAt(j);
|
|
1309
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1310
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1311
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1312
|
+
j++;
|
|
1313
|
+
}
|
|
1314
|
+
const len = j - offset;
|
|
1315
|
+
if (len > 0) {
|
|
1316
|
+
switch (h) {
|
|
1317
|
+
case 3555:
|
|
1318
|
+
if (len === 2 && ((c = text.charCodeAt(offset + 0)) === 111 || c === 79) && ((c = text.charCodeAt(offset + 1)) === 114 || c === 82)) {
|
|
1319
|
+
wordId = 10;
|
|
1320
|
+
return j;
|
|
786
1321
|
}
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
break found;
|
|
793
|
-
}
|
|
794
|
-
RX[4].lastIndex = offset;
|
|
795
|
-
m = RX[4].exec(text);
|
|
796
|
-
if (m !== null && m[0].length > 0) {
|
|
797
|
-
id = 67;
|
|
798
|
-
matched = m[0];
|
|
799
|
-
end = offset + matched.length;
|
|
800
|
-
break found;
|
|
801
|
-
}
|
|
802
|
-
break;
|
|
1322
|
+
break;
|
|
1323
|
+
case 106111099:
|
|
1324
|
+
if (len === 5 && ((c = text.charCodeAt(offset + 0)) === 111 || c === 79) && ((c = text.charCodeAt(offset + 1)) === 117 || c === 85) && ((c = text.charCodeAt(offset + 2)) === 116 || c === 84) && ((c = text.charCodeAt(offset + 3)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 4)) === 114 || c === 82)) {
|
|
1325
|
+
wordId = 22;
|
|
1326
|
+
return j;
|
|
803
1327
|
}
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
break found;
|
|
810
|
-
}
|
|
811
|
-
break;
|
|
1328
|
+
break;
|
|
1329
|
+
case 3551:
|
|
1330
|
+
if (len === 2 && ((c = text.charCodeAt(offset + 0)) === 111 || c === 79) && ((c = text.charCodeAt(offset + 1)) === 110 || c === 78)) {
|
|
1331
|
+
wordId = 25;
|
|
1332
|
+
return j;
|
|
812
1333
|
}
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
break found;
|
|
819
|
-
}
|
|
820
|
-
if (text.startsWith("<=", offset)) {
|
|
821
|
-
id = 70;
|
|
822
|
-
end = offset + 2;
|
|
823
|
-
matched = "<=";
|
|
824
|
-
break found;
|
|
825
|
-
}
|
|
826
|
-
if (code2 === 60) {
|
|
827
|
-
id = 74;
|
|
828
|
-
end = offset + 1;
|
|
829
|
-
matched = "<";
|
|
830
|
-
break found;
|
|
831
|
-
}
|
|
832
|
-
break;
|
|
1334
|
+
break;
|
|
1335
|
+
case 106006350:
|
|
1336
|
+
if (len === 5 && ((c = text.charCodeAt(offset + 0)) === 111 || c === 79) && ((c = text.charCodeAt(offset + 1)) === 114 || c === 82) && ((c = text.charCodeAt(offset + 2)) === 100 || c === 68) && ((c = text.charCodeAt(offset + 3)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 4)) === 114 || c === 82)) {
|
|
1337
|
+
wordId = 29;
|
|
1338
|
+
return j;
|
|
833
1339
|
}
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
break found;
|
|
840
|
-
}
|
|
841
|
-
if (code2 === 61) {
|
|
842
|
-
id = 76;
|
|
843
|
-
end = offset + 1;
|
|
844
|
-
matched = "=";
|
|
845
|
-
break found;
|
|
846
|
-
}
|
|
847
|
-
break;
|
|
1340
|
+
break;
|
|
1341
|
+
case -1019779949:
|
|
1342
|
+
if (len === 6 && ((c = text.charCodeAt(offset + 0)) === 111 || c === 79) && ((c = text.charCodeAt(offset + 1)) === 102 || c === 70) && ((c = text.charCodeAt(offset + 2)) === 102 || c === 70) && ((c = text.charCodeAt(offset + 3)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 4)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 5)) === 116 || c === 84)) {
|
|
1343
|
+
wordId = 35;
|
|
1344
|
+
return j;
|
|
848
1345
|
}
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
break found;
|
|
855
|
-
}
|
|
856
|
-
if (code2 === 62) {
|
|
857
|
-
id = 75;
|
|
858
|
-
end = offset + 1;
|
|
859
|
-
matched = ">";
|
|
860
|
-
break found;
|
|
861
|
-
}
|
|
862
|
-
break;
|
|
1346
|
+
break;
|
|
1347
|
+
case 3423444:
|
|
1348
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 111 || c === 79) && ((c = text.charCodeAt(offset + 1)) === 118 || c === 86) && ((c = text.charCodeAt(offset + 2)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 3)) === 114 || c === 82)) {
|
|
1349
|
+
wordId = 53;
|
|
1350
|
+
return j;
|
|
863
1351
|
}
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
1352
|
+
break;
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
if (j === offset) j++;
|
|
1356
|
+
while (j < length) {
|
|
1357
|
+
c = text.charCodeAt(j);
|
|
1358
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1359
|
+
j++;
|
|
1360
|
+
}
|
|
1361
|
+
wordId = 62;
|
|
1362
|
+
return j;
|
|
1363
|
+
}
|
|
1364
|
+
function word13(text, offset, length) {
|
|
1365
|
+
let c = text.charCodeAt(offset);
|
|
1366
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
1367
|
+
let h = 0;
|
|
1368
|
+
let j = offset;
|
|
1369
|
+
while (j < length) {
|
|
1370
|
+
c = text.charCodeAt(j);
|
|
1371
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1372
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1373
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1374
|
+
j++;
|
|
1375
|
+
}
|
|
1376
|
+
const len = j - offset;
|
|
1377
|
+
if (len > 0) {
|
|
1378
|
+
switch (h) {
|
|
1379
|
+
case 108511772:
|
|
1380
|
+
if (len === 5 && ((c = text.charCodeAt(offset + 0)) === 114 || c === 82) && ((c = text.charCodeAt(offset + 1)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 2)) === 103 || c === 71) && ((c = text.charCodeAt(offset + 3)) === 104 || c === 72) && ((c = text.charCodeAt(offset + 4)) === 116 || c === 84)) {
|
|
1381
|
+
wordId = 20;
|
|
1382
|
+
return j;
|
|
872
1383
|
}
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
id = 30;
|
|
905
|
-
end = e;
|
|
906
|
-
matched = null;
|
|
907
|
-
break found;
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
911
|
-
let j = offset + 1;
|
|
912
|
-
while (j < length) {
|
|
913
|
-
const c = text.charCodeAt(j);
|
|
914
|
-
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
915
|
-
j++;
|
|
916
|
-
}
|
|
917
|
-
id = 62;
|
|
918
|
-
end = j;
|
|
919
|
-
matched = null;
|
|
920
|
-
break found;
|
|
921
|
-
}
|
|
922
|
-
break;
|
|
1384
|
+
break;
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
if (j === offset) j++;
|
|
1388
|
+
while (j < length) {
|
|
1389
|
+
c = text.charCodeAt(j);
|
|
1390
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1391
|
+
j++;
|
|
1392
|
+
}
|
|
1393
|
+
wordId = 62;
|
|
1394
|
+
return j;
|
|
1395
|
+
}
|
|
1396
|
+
function word14(text, offset, length) {
|
|
1397
|
+
let c = text.charCodeAt(offset);
|
|
1398
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
1399
|
+
let h = 0;
|
|
1400
|
+
let j = offset;
|
|
1401
|
+
while (j < length) {
|
|
1402
|
+
c = text.charCodeAt(j);
|
|
1403
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1404
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1405
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1406
|
+
j++;
|
|
1407
|
+
}
|
|
1408
|
+
const len = j - offset;
|
|
1409
|
+
if (len > 0) {
|
|
1410
|
+
switch (h) {
|
|
1411
|
+
case -906021636:
|
|
1412
|
+
if (len === 6 && ((c = text.charCodeAt(offset + 0)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 1)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 2)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 3)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 4)) === 99 || c === 67) && ((c = text.charCodeAt(offset + 5)) === 116 || c === 84)) {
|
|
1413
|
+
wordId = 3;
|
|
1414
|
+
return j;
|
|
923
1415
|
}
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
break;
|
|
1416
|
+
break;
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
if (j === offset) j++;
|
|
1420
|
+
while (j < length) {
|
|
1421
|
+
c = text.charCodeAt(j);
|
|
1422
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1423
|
+
j++;
|
|
1424
|
+
}
|
|
1425
|
+
wordId = 62;
|
|
1426
|
+
return j;
|
|
1427
|
+
}
|
|
1428
|
+
function word15(text, offset, length) {
|
|
1429
|
+
let c = text.charCodeAt(offset);
|
|
1430
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
1431
|
+
let h = 0;
|
|
1432
|
+
let j = offset;
|
|
1433
|
+
while (j < length) {
|
|
1434
|
+
c = text.charCodeAt(j);
|
|
1435
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1436
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1437
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1438
|
+
j++;
|
|
1439
|
+
}
|
|
1440
|
+
const len = j - offset;
|
|
1441
|
+
if (len > 0) {
|
|
1442
|
+
switch (h) {
|
|
1443
|
+
case 3569038:
|
|
1444
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 116 || c === 84) && ((c = text.charCodeAt(offset + 1)) === 114 || c === 82) && ((c = text.charCodeAt(offset + 2)) === 117 || c === 85) && ((c = text.charCodeAt(offset + 3)) === 101 || c === 69)) {
|
|
1445
|
+
wordId = 39;
|
|
1446
|
+
return j;
|
|
956
1447
|
}
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
end = e;
|
|
963
|
-
matched = null;
|
|
964
|
-
break found;
|
|
965
|
-
}
|
|
966
|
-
}
|
|
967
|
-
{
|
|
968
|
-
const e = scanKeyword(text, offset, length, KW[7][0], KW[7][1], look0);
|
|
969
|
-
if (e !== -1) {
|
|
970
|
-
id = 41;
|
|
971
|
-
end = e;
|
|
972
|
-
matched = null;
|
|
973
|
-
break found;
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
|
-
{
|
|
977
|
-
const e = scanKeyword(text, offset, length, KW[8][0], KW[8][1], look0);
|
|
978
|
-
if (e !== -1) {
|
|
979
|
-
id = 51;
|
|
980
|
-
end = e;
|
|
981
|
-
matched = null;
|
|
982
|
-
break found;
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
986
|
-
let j = offset + 1;
|
|
987
|
-
while (j < length) {
|
|
988
|
-
const c = text.charCodeAt(j);
|
|
989
|
-
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
990
|
-
j++;
|
|
991
|
-
}
|
|
992
|
-
id = 62;
|
|
993
|
-
end = j;
|
|
994
|
-
matched = null;
|
|
995
|
-
break found;
|
|
996
|
-
}
|
|
997
|
-
break;
|
|
1448
|
+
break;
|
|
1449
|
+
case 3558941:
|
|
1450
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 116 || c === 84) && ((c = text.charCodeAt(offset + 1)) === 104 || c === 72) && ((c = text.charCodeAt(offset + 2)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 3)) === 110 || c === 78)) {
|
|
1451
|
+
wordId = 43;
|
|
1452
|
+
return j;
|
|
998
1453
|
}
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
break;
|
|
1454
|
+
break;
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
if (j === offset) j++;
|
|
1458
|
+
while (j < length) {
|
|
1459
|
+
c = text.charCodeAt(j);
|
|
1460
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1461
|
+
j++;
|
|
1462
|
+
}
|
|
1463
|
+
wordId = 62;
|
|
1464
|
+
return j;
|
|
1465
|
+
}
|
|
1466
|
+
function word16(text, offset, length) {
|
|
1467
|
+
let c = text.charCodeAt(offset);
|
|
1468
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
1469
|
+
let h = 0;
|
|
1470
|
+
let j = offset;
|
|
1471
|
+
while (j < length) {
|
|
1472
|
+
c = text.charCodeAt(j);
|
|
1473
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1474
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1475
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1476
|
+
j++;
|
|
1477
|
+
}
|
|
1478
|
+
const len = j - offset;
|
|
1479
|
+
if (len > 0) {
|
|
1480
|
+
switch (h) {
|
|
1481
|
+
case 111582340:
|
|
1482
|
+
if (len === 5 && ((c = text.charCodeAt(offset + 0)) === 117 || c === 85) && ((c = text.charCodeAt(offset + 1)) === 115 || c === 83) && ((c = text.charCodeAt(offset + 2)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 3)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 4)) === 103 || c === 71)) {
|
|
1483
|
+
wordId = 26;
|
|
1484
|
+
return j;
|
|
1031
1485
|
}
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1486
|
+
break;
|
|
1487
|
+
case 111433423:
|
|
1488
|
+
if (len === 5 && ((c = text.charCodeAt(offset + 0)) === 117 || c === 85) && ((c = text.charCodeAt(offset + 1)) === 110 || c === 78) && ((c = text.charCodeAt(offset + 2)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 3)) === 111 || c === 79) && ((c = text.charCodeAt(offset + 4)) === 110 || c === 78)) {
|
|
1489
|
+
wordId = 47;
|
|
1490
|
+
return j;
|
|
1491
|
+
}
|
|
1492
|
+
break;
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
if (j === offset) j++;
|
|
1496
|
+
while (j < length) {
|
|
1497
|
+
c = text.charCodeAt(j);
|
|
1498
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1499
|
+
j++;
|
|
1500
|
+
}
|
|
1501
|
+
wordId = 62;
|
|
1502
|
+
return j;
|
|
1503
|
+
}
|
|
1504
|
+
function word17(text, offset, length) {
|
|
1505
|
+
let c = text.charCodeAt(offset);
|
|
1506
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
1507
|
+
let h = 0;
|
|
1508
|
+
let j = offset;
|
|
1509
|
+
while (j < length) {
|
|
1510
|
+
c = text.charCodeAt(j);
|
|
1511
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1512
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1513
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1514
|
+
j++;
|
|
1515
|
+
}
|
|
1516
|
+
const len = j - offset;
|
|
1517
|
+
if (len > 0) {
|
|
1518
|
+
switch (h) {
|
|
1519
|
+
case -823812830:
|
|
1520
|
+
if (len === 6 && ((c = text.charCodeAt(offset + 0)) === 118 || c === 86) && ((c = text.charCodeAt(offset + 1)) === 97 || c === 65) && ((c = text.charCodeAt(offset + 2)) === 108 || c === 76) && ((c = text.charCodeAt(offset + 3)) === 117 || c === 85) && ((c = text.charCodeAt(offset + 4)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 5)) === 115 || c === 83)) {
|
|
1521
|
+
wordId = 38;
|
|
1522
|
+
return j;
|
|
1523
|
+
}
|
|
1524
|
+
break;
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
if (j === offset) j++;
|
|
1528
|
+
while (j < length) {
|
|
1529
|
+
c = text.charCodeAt(j);
|
|
1530
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1531
|
+
j++;
|
|
1532
|
+
}
|
|
1533
|
+
wordId = 62;
|
|
1534
|
+
return j;
|
|
1535
|
+
}
|
|
1536
|
+
function word18(text, offset, length) {
|
|
1537
|
+
let c = text.charCodeAt(offset);
|
|
1538
|
+
if (!(c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) return -1;
|
|
1539
|
+
let h = 0;
|
|
1540
|
+
let j = offset;
|
|
1541
|
+
while (j < length) {
|
|
1542
|
+
c = text.charCodeAt(j);
|
|
1543
|
+
if (!(c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1544
|
+
if (c >= 65 && c <= 90) c += 32;
|
|
1545
|
+
h = Math.imul(h, 31) + c | 0;
|
|
1546
|
+
j++;
|
|
1547
|
+
}
|
|
1548
|
+
const len = j - offset;
|
|
1549
|
+
if (len > 0) {
|
|
1550
|
+
switch (h) {
|
|
1551
|
+
case 113097959:
|
|
1552
|
+
if (len === 5 && ((c = text.charCodeAt(offset + 0)) === 119 || c === 87) && ((c = text.charCodeAt(offset + 1)) === 104 || c === 72) && ((c = text.charCodeAt(offset + 2)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 3)) === 114 || c === 82) && ((c = text.charCodeAt(offset + 4)) === 101 || c === 69)) {
|
|
1553
|
+
wordId = 5;
|
|
1554
|
+
return j;
|
|
1555
|
+
}
|
|
1556
|
+
break;
|
|
1557
|
+
case 3648314:
|
|
1558
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 119 || c === 87) && ((c = text.charCodeAt(offset + 1)) === 104 || c === 72) && ((c = text.charCodeAt(offset + 2)) === 101 || c === 69) && ((c = text.charCodeAt(offset + 3)) === 110 || c === 78)) {
|
|
1559
|
+
wordId = 42;
|
|
1560
|
+
return j;
|
|
1561
|
+
}
|
|
1562
|
+
break;
|
|
1563
|
+
case 3649734:
|
|
1564
|
+
if (len === 4 && ((c = text.charCodeAt(offset + 0)) === 119 || c === 87) && ((c = text.charCodeAt(offset + 1)) === 105 || c === 73) && ((c = text.charCodeAt(offset + 2)) === 116 || c === 84) && ((c = text.charCodeAt(offset + 3)) === 104 || c === 72)) {
|
|
1565
|
+
wordId = 46;
|
|
1566
|
+
return j;
|
|
1567
|
+
}
|
|
1568
|
+
break;
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
if (j === offset) j++;
|
|
1572
|
+
while (j < length) {
|
|
1573
|
+
c = text.charCodeAt(j);
|
|
1574
|
+
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1575
|
+
j++;
|
|
1576
|
+
}
|
|
1577
|
+
wordId = 62;
|
|
1578
|
+
return j;
|
|
1579
|
+
}
|
|
1580
|
+
function tokenize2(text) {
|
|
1581
|
+
if (typeof text !== "string") throw new TypeError("tokenize: expected a string");
|
|
1582
|
+
const tokens_ = [];
|
|
1583
|
+
let offset = 0;
|
|
1584
|
+
let line = 1;
|
|
1585
|
+
let lineStart = 0;
|
|
1586
|
+
const length = text.length;
|
|
1587
|
+
let m = null;
|
|
1588
|
+
while (offset < length) {
|
|
1589
|
+
const code2 = text.charCodeAt(offset);
|
|
1590
|
+
let id = -1;
|
|
1591
|
+
let end = -1;
|
|
1592
|
+
let matched = null;
|
|
1593
|
+
found: {
|
|
1594
|
+
switch (DISPATCH.charCodeAt(code2 < 128 ? code2 : 128) - 256) {
|
|
1595
|
+
case 1: {
|
|
1069
1596
|
{
|
|
1070
|
-
const e =
|
|
1071
|
-
if (e
|
|
1072
|
-
|
|
1597
|
+
const e = scan0(text, offset, length);
|
|
1598
|
+
if (e === -2) {
|
|
1599
|
+
RX[0].lastIndex = offset;
|
|
1600
|
+
if (RX[0].test(text) && RX[0].lastIndex > offset) {
|
|
1601
|
+
id = 0;
|
|
1602
|
+
end = RX[0].lastIndex;
|
|
1603
|
+
matched = null;
|
|
1604
|
+
break found;
|
|
1605
|
+
}
|
|
1606
|
+
} else if (e !== -1) {
|
|
1607
|
+
id = 0;
|
|
1073
1608
|
end = e;
|
|
1074
1609
|
matched = null;
|
|
1075
1610
|
break found;
|
|
1076
1611
|
}
|
|
1077
1612
|
}
|
|
1078
|
-
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
1079
|
-
let j = offset + 1;
|
|
1080
|
-
while (j < length) {
|
|
1081
|
-
const c = text.charCodeAt(j);
|
|
1082
|
-
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1083
|
-
j++;
|
|
1084
|
-
}
|
|
1085
|
-
id = 62;
|
|
1086
|
-
end = j;
|
|
1087
|
-
matched = null;
|
|
1088
|
-
break found;
|
|
1089
|
-
}
|
|
1090
1613
|
break;
|
|
1091
1614
|
}
|
|
1092
|
-
case
|
|
1093
|
-
{
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
matched = null;
|
|
1099
|
-
break found;
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
{
|
|
1103
|
-
const e = scanKeyword(text, offset, length, KW[17][0], KW[17][1], look0);
|
|
1104
|
-
if (e !== -1) {
|
|
1105
|
-
id = 21;
|
|
1106
|
-
end = e;
|
|
1107
|
-
matched = null;
|
|
1108
|
-
break found;
|
|
1109
|
-
}
|
|
1110
|
-
}
|
|
1111
|
-
{
|
|
1112
|
-
const e = scanKeyword(text, offset, length, KW[18][0], KW[18][1], look0);
|
|
1113
|
-
if (e !== -1) {
|
|
1114
|
-
id = 40;
|
|
1115
|
-
end = e;
|
|
1116
|
-
matched = null;
|
|
1117
|
-
break found;
|
|
1118
|
-
}
|
|
1615
|
+
case 2: {
|
|
1616
|
+
if (text.startsWith("!=", offset)) {
|
|
1617
|
+
id = 72;
|
|
1618
|
+
end = offset + 2;
|
|
1619
|
+
matched = "!=";
|
|
1620
|
+
break found;
|
|
1119
1621
|
}
|
|
1622
|
+
break;
|
|
1623
|
+
}
|
|
1624
|
+
case 3: {
|
|
1120
1625
|
{
|
|
1121
|
-
const e =
|
|
1626
|
+
const e = scan60(text, offset);
|
|
1122
1627
|
if (e !== -1) {
|
|
1123
|
-
id =
|
|
1628
|
+
id = 60;
|
|
1124
1629
|
end = e;
|
|
1125
1630
|
matched = null;
|
|
1126
1631
|
break found;
|
|
1127
1632
|
}
|
|
1128
1633
|
}
|
|
1634
|
+
break;
|
|
1635
|
+
}
|
|
1636
|
+
case 4: {
|
|
1129
1637
|
{
|
|
1130
|
-
const e =
|
|
1638
|
+
const e = dfa0(text, offset, length);
|
|
1131
1639
|
if (e !== -1) {
|
|
1132
|
-
id =
|
|
1640
|
+
id = dfaId;
|
|
1133
1641
|
end = e;
|
|
1134
1642
|
matched = null;
|
|
1135
1643
|
break found;
|
|
1136
1644
|
}
|
|
1137
1645
|
}
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
id = 62;
|
|
1146
|
-
end = j;
|
|
1147
|
-
matched = null;
|
|
1646
|
+
break;
|
|
1647
|
+
}
|
|
1648
|
+
case 5: {
|
|
1649
|
+
if (code2 === 37) {
|
|
1650
|
+
id = 81;
|
|
1651
|
+
end = offset + 1;
|
|
1652
|
+
matched = "%";
|
|
1148
1653
|
break found;
|
|
1149
1654
|
}
|
|
1150
1655
|
break;
|
|
1151
1656
|
}
|
|
1152
|
-
case
|
|
1657
|
+
case 6: {
|
|
1153
1658
|
{
|
|
1154
|
-
const e =
|
|
1659
|
+
const e = scan59(text, offset);
|
|
1155
1660
|
if (e !== -1) {
|
|
1156
|
-
id =
|
|
1661
|
+
id = 59;
|
|
1157
1662
|
end = e;
|
|
1158
1663
|
matched = null;
|
|
1159
1664
|
break found;
|
|
1160
1665
|
}
|
|
1161
1666
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1667
|
+
break;
|
|
1668
|
+
}
|
|
1669
|
+
case 7: {
|
|
1670
|
+
if (code2 === 40) {
|
|
1671
|
+
id = 82;
|
|
1672
|
+
end = offset + 1;
|
|
1673
|
+
matched = "(";
|
|
1674
|
+
break found;
|
|
1675
|
+
}
|
|
1676
|
+
break;
|
|
1677
|
+
}
|
|
1678
|
+
case 8: {
|
|
1679
|
+
if (code2 === 41) {
|
|
1680
|
+
id = 83;
|
|
1681
|
+
end = offset + 1;
|
|
1682
|
+
matched = ")";
|
|
1683
|
+
break found;
|
|
1684
|
+
}
|
|
1685
|
+
break;
|
|
1686
|
+
}
|
|
1687
|
+
case 9: {
|
|
1688
|
+
if (code2 === 42) {
|
|
1689
|
+
id = 79;
|
|
1690
|
+
end = offset + 1;
|
|
1691
|
+
matched = "*";
|
|
1692
|
+
break found;
|
|
1693
|
+
}
|
|
1694
|
+
break;
|
|
1695
|
+
}
|
|
1696
|
+
case 10: {
|
|
1697
|
+
if (code2 === 43) {
|
|
1698
|
+
id = 77;
|
|
1699
|
+
end = offset + 1;
|
|
1700
|
+
matched = "+";
|
|
1701
|
+
break found;
|
|
1702
|
+
}
|
|
1703
|
+
break;
|
|
1704
|
+
}
|
|
1705
|
+
case 11: {
|
|
1706
|
+
if (code2 === 44) {
|
|
1707
|
+
id = 86;
|
|
1708
|
+
end = offset + 1;
|
|
1709
|
+
matched = ",";
|
|
1710
|
+
break found;
|
|
1711
|
+
}
|
|
1712
|
+
break;
|
|
1713
|
+
}
|
|
1714
|
+
case 12: {
|
|
1715
|
+
if (text.startsWith("--", offset)) {
|
|
1716
|
+
let j = offset + 2;
|
|
1164
1717
|
while (j < length) {
|
|
1165
1718
|
const c = text.charCodeAt(j);
|
|
1166
|
-
if (
|
|
1719
|
+
if (c === 10) break;
|
|
1167
1720
|
j++;
|
|
1168
1721
|
}
|
|
1169
|
-
id =
|
|
1722
|
+
id = 1;
|
|
1170
1723
|
end = j;
|
|
1171
1724
|
matched = null;
|
|
1172
1725
|
break found;
|
|
1173
1726
|
}
|
|
1727
|
+
if (text.startsWith("->>", offset)) {
|
|
1728
|
+
id = 64;
|
|
1729
|
+
end = offset + 3;
|
|
1730
|
+
matched = "->>";
|
|
1731
|
+
break found;
|
|
1732
|
+
}
|
|
1733
|
+
if (text.startsWith("->", offset)) {
|
|
1734
|
+
id = 65;
|
|
1735
|
+
end = offset + 2;
|
|
1736
|
+
matched = "->";
|
|
1737
|
+
break found;
|
|
1738
|
+
}
|
|
1739
|
+
if (code2 === 45) {
|
|
1740
|
+
id = 78;
|
|
1741
|
+
end = offset + 1;
|
|
1742
|
+
matched = "-";
|
|
1743
|
+
break found;
|
|
1744
|
+
}
|
|
1174
1745
|
break;
|
|
1175
1746
|
}
|
|
1176
|
-
case
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
}
|
|
1747
|
+
case 13: {
|
|
1748
|
+
RX[1].lastIndex = offset;
|
|
1749
|
+
m = RX[1].exec(text);
|
|
1750
|
+
if (m !== null && m[0].length > 0) {
|
|
1751
|
+
id = 58;
|
|
1752
|
+
matched = m[0];
|
|
1753
|
+
end = offset + matched.length;
|
|
1754
|
+
break found;
|
|
1185
1755
|
}
|
|
1186
|
-
if (code2
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1756
|
+
if (code2 === 46) {
|
|
1757
|
+
id = 87;
|
|
1758
|
+
end = offset + 1;
|
|
1759
|
+
matched = ".";
|
|
1760
|
+
break found;
|
|
1761
|
+
}
|
|
1762
|
+
break;
|
|
1763
|
+
}
|
|
1764
|
+
case 14: {
|
|
1765
|
+
RX[2].lastIndex = offset;
|
|
1766
|
+
if (RX[2].test(text) && RX[2].lastIndex > offset) {
|
|
1767
|
+
id = 2;
|
|
1768
|
+
end = RX[2].lastIndex;
|
|
1195
1769
|
matched = null;
|
|
1196
1770
|
break found;
|
|
1197
1771
|
}
|
|
1772
|
+
if (code2 === 47) {
|
|
1773
|
+
id = 80;
|
|
1774
|
+
end = offset + 1;
|
|
1775
|
+
matched = "/";
|
|
1776
|
+
break found;
|
|
1777
|
+
}
|
|
1198
1778
|
break;
|
|
1199
1779
|
}
|
|
1200
|
-
case
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
}
|
|
1780
|
+
case 15: {
|
|
1781
|
+
RX[1].lastIndex = offset;
|
|
1782
|
+
m = RX[1].exec(text);
|
|
1783
|
+
if (m !== null && m[0].length > 0) {
|
|
1784
|
+
id = 58;
|
|
1785
|
+
matched = m[0];
|
|
1786
|
+
end = offset + matched.length;
|
|
1787
|
+
break found;
|
|
1209
1788
|
}
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1789
|
+
break;
|
|
1790
|
+
}
|
|
1791
|
+
case 16: {
|
|
1792
|
+
if (text.startsWith("::", offset)) {
|
|
1793
|
+
id = 66;
|
|
1794
|
+
end = offset + 2;
|
|
1795
|
+
matched = "::";
|
|
1796
|
+
break found;
|
|
1218
1797
|
}
|
|
1219
1798
|
{
|
|
1220
|
-
const e =
|
|
1799
|
+
const e = dfa1(text, offset, length);
|
|
1221
1800
|
if (e !== -1) {
|
|
1222
|
-
id =
|
|
1801
|
+
id = dfaId;
|
|
1223
1802
|
end = e;
|
|
1224
1803
|
matched = null;
|
|
1225
1804
|
break found;
|
|
1226
1805
|
}
|
|
1227
1806
|
}
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1807
|
+
break;
|
|
1808
|
+
}
|
|
1809
|
+
case 17: {
|
|
1810
|
+
if (code2 === 59) {
|
|
1811
|
+
id = 88;
|
|
1812
|
+
end = offset + 1;
|
|
1813
|
+
matched = ";";
|
|
1814
|
+
break found;
|
|
1236
1815
|
}
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1816
|
+
break;
|
|
1817
|
+
}
|
|
1818
|
+
case 18: {
|
|
1819
|
+
if (text.startsWith("<>", offset)) {
|
|
1820
|
+
id = 69;
|
|
1821
|
+
end = offset + 2;
|
|
1822
|
+
matched = "<>";
|
|
1823
|
+
break found;
|
|
1245
1824
|
}
|
|
1246
|
-
{
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
matched = null;
|
|
1252
|
-
break found;
|
|
1253
|
-
}
|
|
1825
|
+
if (text.startsWith("<=", offset)) {
|
|
1826
|
+
id = 70;
|
|
1827
|
+
end = offset + 2;
|
|
1828
|
+
matched = "<=";
|
|
1829
|
+
break found;
|
|
1254
1830
|
}
|
|
1255
|
-
{
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
matched = null;
|
|
1261
|
-
break found;
|
|
1262
|
-
}
|
|
1831
|
+
if (code2 === 60) {
|
|
1832
|
+
id = 74;
|
|
1833
|
+
end = offset + 1;
|
|
1834
|
+
matched = "<";
|
|
1835
|
+
break found;
|
|
1263
1836
|
}
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1837
|
+
break;
|
|
1838
|
+
}
|
|
1839
|
+
case 19: {
|
|
1840
|
+
if (text.startsWith("==", offset)) {
|
|
1841
|
+
id = 73;
|
|
1842
|
+
end = offset + 2;
|
|
1843
|
+
matched = "==";
|
|
1844
|
+
break found;
|
|
1845
|
+
}
|
|
1846
|
+
if (code2 === 61) {
|
|
1847
|
+
id = 76;
|
|
1848
|
+
end = offset + 1;
|
|
1849
|
+
matched = "=";
|
|
1850
|
+
break found;
|
|
1851
|
+
}
|
|
1852
|
+
break;
|
|
1853
|
+
}
|
|
1854
|
+
case 20: {
|
|
1855
|
+
if (text.startsWith(">=", offset)) {
|
|
1856
|
+
id = 71;
|
|
1857
|
+
end = offset + 2;
|
|
1858
|
+
matched = ">=";
|
|
1274
1859
|
break found;
|
|
1275
1860
|
}
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
const e = scanKeyword(text, offset, length, KW[30][0], KW[30][1], look0);
|
|
1281
|
-
if (e !== -1) {
|
|
1282
|
-
id = 24;
|
|
1283
|
-
end = e;
|
|
1284
|
-
matched = null;
|
|
1285
|
-
break found;
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
1289
|
-
let j = offset + 1;
|
|
1290
|
-
while (j < length) {
|
|
1291
|
-
const c = text.charCodeAt(j);
|
|
1292
|
-
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1293
|
-
j++;
|
|
1294
|
-
}
|
|
1295
|
-
id = 62;
|
|
1296
|
-
end = j;
|
|
1297
|
-
matched = null;
|
|
1861
|
+
if (code2 === 62) {
|
|
1862
|
+
id = 75;
|
|
1863
|
+
end = offset + 1;
|
|
1864
|
+
matched = ">";
|
|
1298
1865
|
break found;
|
|
1299
1866
|
}
|
|
1300
1867
|
break;
|
|
1301
1868
|
}
|
|
1302
|
-
case
|
|
1303
|
-
if (code2
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1308
|
-
j++;
|
|
1309
|
-
}
|
|
1310
|
-
id = 62;
|
|
1311
|
-
end = j;
|
|
1312
|
-
matched = null;
|
|
1869
|
+
case 21: {
|
|
1870
|
+
if (code2 === 63) {
|
|
1871
|
+
id = 89;
|
|
1872
|
+
end = offset + 1;
|
|
1873
|
+
matched = "?";
|
|
1313
1874
|
break found;
|
|
1314
1875
|
}
|
|
1315
1876
|
break;
|
|
1316
1877
|
}
|
|
1317
|
-
case
|
|
1318
|
-
{
|
|
1319
|
-
const e = scanKeyword(text, offset, length, KW[31][0], KW[31][1], look0);
|
|
1320
|
-
if (e !== -1) {
|
|
1321
|
-
id = 15;
|
|
1322
|
-
end = e;
|
|
1323
|
-
matched = null;
|
|
1324
|
-
break found;
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
{
|
|
1328
|
-
const e = scanKeyword(text, offset, length, KW[32][0], KW[32][1], look0);
|
|
1329
|
-
if (e !== -1) {
|
|
1330
|
-
id = 19;
|
|
1331
|
-
end = e;
|
|
1332
|
-
matched = null;
|
|
1333
|
-
break found;
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1878
|
+
case 22: {
|
|
1336
1879
|
{
|
|
1337
|
-
const e =
|
|
1880
|
+
const e = word0(text, offset, length);
|
|
1338
1881
|
if (e !== -1) {
|
|
1339
|
-
id =
|
|
1882
|
+
id = wordId;
|
|
1340
1883
|
end = e;
|
|
1341
1884
|
matched = null;
|
|
1342
1885
|
break found;
|
|
1343
1886
|
}
|
|
1344
1887
|
}
|
|
1345
|
-
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
1346
|
-
let j = offset + 1;
|
|
1347
|
-
while (j < length) {
|
|
1348
|
-
const c = text.charCodeAt(j);
|
|
1349
|
-
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1350
|
-
j++;
|
|
1351
|
-
}
|
|
1352
|
-
id = 62;
|
|
1353
|
-
end = j;
|
|
1354
|
-
matched = null;
|
|
1355
|
-
break found;
|
|
1356
|
-
}
|
|
1357
1888
|
break;
|
|
1358
1889
|
}
|
|
1359
|
-
case
|
|
1890
|
+
case 23: {
|
|
1360
1891
|
{
|
|
1361
|
-
const e =
|
|
1892
|
+
const e = word1(text, offset, length);
|
|
1362
1893
|
if (e !== -1) {
|
|
1363
|
-
id =
|
|
1894
|
+
id = wordId;
|
|
1364
1895
|
end = e;
|
|
1365
1896
|
matched = null;
|
|
1366
1897
|
break found;
|
|
1367
1898
|
}
|
|
1368
1899
|
}
|
|
1900
|
+
break;
|
|
1901
|
+
}
|
|
1902
|
+
case 24: {
|
|
1369
1903
|
{
|
|
1370
|
-
const e =
|
|
1904
|
+
const e = word2(text, offset, length);
|
|
1371
1905
|
if (e !== -1) {
|
|
1372
|
-
id =
|
|
1906
|
+
id = wordId;
|
|
1373
1907
|
end = e;
|
|
1374
1908
|
matched = null;
|
|
1375
1909
|
break found;
|
|
1376
1910
|
}
|
|
1377
1911
|
}
|
|
1912
|
+
break;
|
|
1913
|
+
}
|
|
1914
|
+
case 25: {
|
|
1378
1915
|
{
|
|
1379
|
-
const e =
|
|
1916
|
+
const e = word3(text, offset, length);
|
|
1380
1917
|
if (e !== -1) {
|
|
1381
|
-
id =
|
|
1918
|
+
id = wordId;
|
|
1382
1919
|
end = e;
|
|
1383
1920
|
matched = null;
|
|
1384
1921
|
break found;
|
|
1385
1922
|
}
|
|
1386
1923
|
}
|
|
1387
|
-
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
1388
|
-
let j = offset + 1;
|
|
1389
|
-
while (j < length) {
|
|
1390
|
-
const c = text.charCodeAt(j);
|
|
1391
|
-
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1392
|
-
j++;
|
|
1393
|
-
}
|
|
1394
|
-
id = 62;
|
|
1395
|
-
end = j;
|
|
1396
|
-
matched = null;
|
|
1397
|
-
break found;
|
|
1398
|
-
}
|
|
1399
1924
|
break;
|
|
1400
1925
|
}
|
|
1401
|
-
case
|
|
1926
|
+
case 26: {
|
|
1402
1927
|
{
|
|
1403
|
-
const e =
|
|
1928
|
+
const e = word4(text, offset, length);
|
|
1404
1929
|
if (e !== -1) {
|
|
1405
|
-
id =
|
|
1930
|
+
id = wordId;
|
|
1406
1931
|
end = e;
|
|
1407
1932
|
matched = null;
|
|
1408
1933
|
break found;
|
|
1409
1934
|
}
|
|
1410
1935
|
}
|
|
1936
|
+
break;
|
|
1937
|
+
}
|
|
1938
|
+
case 27: {
|
|
1411
1939
|
{
|
|
1412
|
-
const e =
|
|
1940
|
+
const e = word5(text, offset, length);
|
|
1413
1941
|
if (e !== -1) {
|
|
1414
|
-
id =
|
|
1942
|
+
id = wordId;
|
|
1415
1943
|
end = e;
|
|
1416
1944
|
matched = null;
|
|
1417
1945
|
break found;
|
|
1418
1946
|
}
|
|
1419
1947
|
}
|
|
1948
|
+
break;
|
|
1949
|
+
}
|
|
1950
|
+
case 28: {
|
|
1420
1951
|
{
|
|
1421
|
-
const e =
|
|
1952
|
+
const e = word6(text, offset, length);
|
|
1422
1953
|
if (e !== -1) {
|
|
1423
|
-
id =
|
|
1954
|
+
id = wordId;
|
|
1424
1955
|
end = e;
|
|
1425
1956
|
matched = null;
|
|
1426
1957
|
break found;
|
|
1427
1958
|
}
|
|
1428
1959
|
}
|
|
1960
|
+
break;
|
|
1961
|
+
}
|
|
1962
|
+
case 29: {
|
|
1429
1963
|
{
|
|
1430
|
-
const e =
|
|
1964
|
+
const e = word7(text, offset, length);
|
|
1431
1965
|
if (e !== -1) {
|
|
1432
|
-
id =
|
|
1966
|
+
id = wordId;
|
|
1433
1967
|
end = e;
|
|
1434
1968
|
matched = null;
|
|
1435
1969
|
break found;
|
|
1436
1970
|
}
|
|
1437
1971
|
}
|
|
1972
|
+
break;
|
|
1973
|
+
}
|
|
1974
|
+
case 30: {
|
|
1438
1975
|
{
|
|
1439
|
-
const e =
|
|
1976
|
+
const e = word8(text, offset, length);
|
|
1440
1977
|
if (e !== -1) {
|
|
1441
|
-
id =
|
|
1978
|
+
id = wordId;
|
|
1442
1979
|
end = e;
|
|
1443
1980
|
matched = null;
|
|
1444
1981
|
break found;
|
|
1445
1982
|
}
|
|
1446
1983
|
}
|
|
1984
|
+
break;
|
|
1985
|
+
}
|
|
1986
|
+
case 31: {
|
|
1447
1987
|
{
|
|
1448
|
-
const e =
|
|
1988
|
+
const e = word9(text, offset, length);
|
|
1449
1989
|
if (e !== -1) {
|
|
1450
|
-
id =
|
|
1990
|
+
id = wordId;
|
|
1451
1991
|
end = e;
|
|
1452
1992
|
matched = null;
|
|
1453
1993
|
break found;
|
|
1454
1994
|
}
|
|
1455
1995
|
}
|
|
1996
|
+
break;
|
|
1997
|
+
}
|
|
1998
|
+
case 32: {
|
|
1456
1999
|
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
1457
2000
|
let j = offset + 1;
|
|
1458
2001
|
while (j < length) {
|
|
@@ -1467,103 +2010,70 @@ var lexer = (() => {
|
|
|
1467
2010
|
}
|
|
1468
2011
|
break;
|
|
1469
2012
|
}
|
|
1470
|
-
case
|
|
2013
|
+
case 33: {
|
|
1471
2014
|
{
|
|
1472
|
-
const e =
|
|
2015
|
+
const e = word10(text, offset, length);
|
|
1473
2016
|
if (e !== -1) {
|
|
1474
|
-
id =
|
|
2017
|
+
id = wordId;
|
|
1475
2018
|
end = e;
|
|
1476
2019
|
matched = null;
|
|
1477
2020
|
break found;
|
|
1478
2021
|
}
|
|
1479
2022
|
}
|
|
1480
|
-
RX[5].lastIndex = offset;
|
|
1481
|
-
m = RX[5].exec(text);
|
|
1482
|
-
if (m !== null && m[0].length > 0) {
|
|
1483
|
-
id = 57;
|
|
1484
|
-
matched = m[0];
|
|
1485
|
-
end = offset + matched.length;
|
|
1486
|
-
break found;
|
|
1487
|
-
}
|
|
1488
|
-
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
1489
|
-
let j = offset + 1;
|
|
1490
|
-
while (j < length) {
|
|
1491
|
-
const c = text.charCodeAt(j);
|
|
1492
|
-
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1493
|
-
j++;
|
|
1494
|
-
}
|
|
1495
|
-
id = 62;
|
|
1496
|
-
end = j;
|
|
1497
|
-
matched = null;
|
|
1498
|
-
break found;
|
|
1499
|
-
}
|
|
1500
2023
|
break;
|
|
1501
2024
|
}
|
|
1502
|
-
case
|
|
2025
|
+
case 34: {
|
|
1503
2026
|
{
|
|
1504
|
-
const e =
|
|
2027
|
+
const e = word11(text, offset, length);
|
|
1505
2028
|
if (e !== -1) {
|
|
1506
|
-
id =
|
|
2029
|
+
id = wordId;
|
|
1507
2030
|
end = e;
|
|
1508
2031
|
matched = null;
|
|
1509
2032
|
break found;
|
|
1510
2033
|
}
|
|
1511
2034
|
}
|
|
1512
|
-
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
1513
|
-
let j = offset + 1;
|
|
1514
|
-
while (j < length) {
|
|
1515
|
-
const c = text.charCodeAt(j);
|
|
1516
|
-
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1517
|
-
j++;
|
|
1518
|
-
}
|
|
1519
|
-
id = 62;
|
|
1520
|
-
end = j;
|
|
1521
|
-
matched = null;
|
|
1522
|
-
break found;
|
|
1523
|
-
}
|
|
1524
2035
|
break;
|
|
1525
2036
|
}
|
|
1526
|
-
case
|
|
2037
|
+
case 35: {
|
|
1527
2038
|
{
|
|
1528
|
-
const e =
|
|
2039
|
+
const e = word12(text, offset, length);
|
|
1529
2040
|
if (e !== -1) {
|
|
1530
|
-
id =
|
|
2041
|
+
id = wordId;
|
|
1531
2042
|
end = e;
|
|
1532
2043
|
matched = null;
|
|
1533
2044
|
break found;
|
|
1534
2045
|
}
|
|
1535
2046
|
}
|
|
1536
|
-
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
1537
|
-
let j = offset + 1;
|
|
1538
|
-
while (j < length) {
|
|
1539
|
-
const c = text.charCodeAt(j);
|
|
1540
|
-
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1541
|
-
j++;
|
|
1542
|
-
}
|
|
1543
|
-
id = 62;
|
|
1544
|
-
end = j;
|
|
1545
|
-
matched = null;
|
|
1546
|
-
break found;
|
|
1547
|
-
}
|
|
1548
2047
|
break;
|
|
1549
2048
|
}
|
|
1550
|
-
case
|
|
2049
|
+
case 36: {
|
|
1551
2050
|
{
|
|
1552
|
-
const e = scanKeyword(text, offset, length, KW[
|
|
2051
|
+
const e = scanKeyword(text, offset, length, KW[0][0], KW[0][1], look0);
|
|
1553
2052
|
if (e !== -1) {
|
|
1554
|
-
id =
|
|
2053
|
+
id = 54;
|
|
1555
2054
|
end = e;
|
|
1556
2055
|
matched = null;
|
|
1557
2056
|
break found;
|
|
1558
2057
|
}
|
|
1559
2058
|
}
|
|
1560
2059
|
{
|
|
1561
|
-
|
|
1562
|
-
if (
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
2060
|
+
let maybe3 = -1;
|
|
2061
|
+
if (!off3) {
|
|
2062
|
+
maybe3 = dfa3(text, offset, length);
|
|
2063
|
+
if (++calls3 === 64 && passes3 * 10 > 448) off3 = true;
|
|
2064
|
+
if (maybe3 !== 0 && calls3 <= 64) passes3++;
|
|
2065
|
+
}
|
|
2066
|
+
if (maybe3 !== 0) {
|
|
2067
|
+
if ((maybe3 & 1) !== 0) {
|
|
2068
|
+
RX[3].lastIndex = offset;
|
|
2069
|
+
m = RX[3].exec(text);
|
|
2070
|
+
if (m !== null && m[0].length > 0) {
|
|
2071
|
+
id = 57;
|
|
2072
|
+
matched = m[0];
|
|
2073
|
+
end = offset + matched.length;
|
|
2074
|
+
break found;
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
1567
2077
|
}
|
|
1568
2078
|
}
|
|
1569
2079
|
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
@@ -1580,103 +2090,76 @@ var lexer = (() => {
|
|
|
1580
2090
|
}
|
|
1581
2091
|
break;
|
|
1582
2092
|
}
|
|
1583
|
-
case
|
|
2093
|
+
case 37: {
|
|
1584
2094
|
{
|
|
1585
|
-
const e =
|
|
2095
|
+
const e = word13(text, offset, length);
|
|
1586
2096
|
if (e !== -1) {
|
|
1587
|
-
id =
|
|
2097
|
+
id = wordId;
|
|
1588
2098
|
end = e;
|
|
1589
2099
|
matched = null;
|
|
1590
2100
|
break found;
|
|
1591
2101
|
}
|
|
1592
2102
|
}
|
|
2103
|
+
break;
|
|
2104
|
+
}
|
|
2105
|
+
case 38: {
|
|
1593
2106
|
{
|
|
1594
|
-
const e =
|
|
2107
|
+
const e = word14(text, offset, length);
|
|
1595
2108
|
if (e !== -1) {
|
|
1596
|
-
id =
|
|
2109
|
+
id = wordId;
|
|
1597
2110
|
end = e;
|
|
1598
2111
|
matched = null;
|
|
1599
2112
|
break found;
|
|
1600
2113
|
}
|
|
1601
2114
|
}
|
|
1602
|
-
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
1603
|
-
let j = offset + 1;
|
|
1604
|
-
while (j < length) {
|
|
1605
|
-
const c = text.charCodeAt(j);
|
|
1606
|
-
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1607
|
-
j++;
|
|
1608
|
-
}
|
|
1609
|
-
id = 62;
|
|
1610
|
-
end = j;
|
|
1611
|
-
matched = null;
|
|
1612
|
-
break found;
|
|
1613
|
-
}
|
|
1614
2115
|
break;
|
|
1615
2116
|
}
|
|
1616
|
-
case
|
|
2117
|
+
case 39: {
|
|
1617
2118
|
{
|
|
1618
|
-
const e =
|
|
2119
|
+
const e = word15(text, offset, length);
|
|
1619
2120
|
if (e !== -1) {
|
|
1620
|
-
id =
|
|
2121
|
+
id = wordId;
|
|
1621
2122
|
end = e;
|
|
1622
2123
|
matched = null;
|
|
1623
2124
|
break found;
|
|
1624
2125
|
}
|
|
1625
2126
|
}
|
|
1626
|
-
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
1627
|
-
let j = offset + 1;
|
|
1628
|
-
while (j < length) {
|
|
1629
|
-
const c = text.charCodeAt(j);
|
|
1630
|
-
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1631
|
-
j++;
|
|
1632
|
-
}
|
|
1633
|
-
id = 62;
|
|
1634
|
-
end = j;
|
|
1635
|
-
matched = null;
|
|
1636
|
-
break found;
|
|
1637
|
-
}
|
|
1638
2127
|
break;
|
|
1639
2128
|
}
|
|
1640
|
-
case
|
|
2129
|
+
case 40: {
|
|
1641
2130
|
{
|
|
1642
|
-
const e =
|
|
2131
|
+
const e = word16(text, offset, length);
|
|
1643
2132
|
if (e !== -1) {
|
|
1644
|
-
id =
|
|
2133
|
+
id = wordId;
|
|
1645
2134
|
end = e;
|
|
1646
2135
|
matched = null;
|
|
1647
2136
|
break found;
|
|
1648
2137
|
}
|
|
1649
2138
|
}
|
|
2139
|
+
break;
|
|
2140
|
+
}
|
|
2141
|
+
case 41: {
|
|
1650
2142
|
{
|
|
1651
|
-
const e =
|
|
2143
|
+
const e = word17(text, offset, length);
|
|
1652
2144
|
if (e !== -1) {
|
|
1653
|
-
id =
|
|
2145
|
+
id = wordId;
|
|
1654
2146
|
end = e;
|
|
1655
2147
|
matched = null;
|
|
1656
2148
|
break found;
|
|
1657
2149
|
}
|
|
1658
2150
|
}
|
|
2151
|
+
break;
|
|
2152
|
+
}
|
|
2153
|
+
case 42: {
|
|
1659
2154
|
{
|
|
1660
|
-
const e =
|
|
2155
|
+
const e = word18(text, offset, length);
|
|
1661
2156
|
if (e !== -1) {
|
|
1662
|
-
id =
|
|
2157
|
+
id = wordId;
|
|
1663
2158
|
end = e;
|
|
1664
2159
|
matched = null;
|
|
1665
2160
|
break found;
|
|
1666
2161
|
}
|
|
1667
2162
|
}
|
|
1668
|
-
if (code2 >= 65 && code2 <= 90 || code2 === 95 || code2 >= 97 && code2 <= 122) {
|
|
1669
|
-
let j = offset + 1;
|
|
1670
|
-
while (j < length) {
|
|
1671
|
-
const c = text.charCodeAt(j);
|
|
1672
|
-
if (!(c === 36 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122)) break;
|
|
1673
|
-
j++;
|
|
1674
|
-
}
|
|
1675
|
-
id = 62;
|
|
1676
|
-
end = j;
|
|
1677
|
-
matched = null;
|
|
1678
|
-
break found;
|
|
1679
|
-
}
|
|
1680
2163
|
break;
|
|
1681
2164
|
}
|
|
1682
2165
|
case 43: {
|
|
@@ -1698,13 +2181,14 @@ var lexer = (() => {
|
|
|
1698
2181
|
break;
|
|
1699
2182
|
}
|
|
1700
2183
|
case 45: {
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
2184
|
+
{
|
|
2185
|
+
const e = dfa2(text, offset, length);
|
|
2186
|
+
if (e !== -1) {
|
|
2187
|
+
id = dfaId;
|
|
2188
|
+
end = e;
|
|
2189
|
+
matched = null;
|
|
2190
|
+
break found;
|
|
2191
|
+
}
|
|
1708
2192
|
}
|
|
1709
2193
|
break;
|
|
1710
2194
|
}
|
|
@@ -12630,6 +13114,61 @@ var internal = {
|
|
|
12630
13114
|
// One output row from `[name, value, name, value, ...]`. Compiled, it is a single
|
|
12631
13115
|
// object literal, so a whole select list costs one call per row. Not
|
|
12632
13116
|
// deterministic: each row needs its own object, never a folded shared one.
|
|
13117
|
+
// A one-table GROUP BY as one function: [alias, where | null, keys, aggregates], each
|
|
13118
|
+
// aggregate { kind, star, arg, filter }. The loop, the group lookup and the running
|
|
13119
|
+
// totals are one piece of code. Rows come in as `context.$scan`, the group table as
|
|
13120
|
+
// `context.$grp`. COUNT, SUM, AVG, MIN and MAX only: the incremental ones.
|
|
13121
|
+
GROUPSCAN: {
|
|
13122
|
+
method: () => {
|
|
13123
|
+
throw new SqlError("GROUPSCAN runs compiled only");
|
|
13124
|
+
},
|
|
13125
|
+
compile: ([alias, where, keys, aggs], bs) => {
|
|
13126
|
+
const raw = (text) => bs.compile([text]);
|
|
13127
|
+
const simple = (logic) => {
|
|
13128
|
+
const v = logic !== null && typeof logic === "object" ? logic.val : null;
|
|
13129
|
+
return Array.isArray(v) && v.length === 2 && v[0] === alias && typeof v[1] === "string" ? v[1] : null;
|
|
13130
|
+
};
|
|
13131
|
+
const read = (logic) => {
|
|
13132
|
+
const column = simple(logic);
|
|
13133
|
+
return column === null ? logic : raw(`(typeof (p = (r?.[${JSON.stringify(column)}] ?? null)) === "function" ? null : p)`);
|
|
13134
|
+
};
|
|
13135
|
+
const exprs = [...keys, ...aggs.flatMap((a) => [a.arg, a.filter])].filter((e) => e !== null);
|
|
13136
|
+
const needsContext = where !== null || exprs.some((e) => simple(e) === null);
|
|
13137
|
+
let res = raw('(() => { const rows = context["$scan"], grp = context["$grp"], root = grp.root, open = grp.open; let single = null, p, prev; const ints = []; for (let i = 0; i < rows.length; i++) { ');
|
|
13138
|
+
res = bs.compile`${res}if ((i & 1023) === 0) ${sync2(tick)}(Math.min(1024, rows.length - i)); const r = rows[i]; `;
|
|
13139
|
+
if (needsContext) res = bs.compile`${res}context[${alias}] = r; `;
|
|
13140
|
+
if (where !== null) res = bs.compile`${res}if (!${sync2(isTrue)}(${where})) continue; `;
|
|
13141
|
+
const fresh = raw(`{ ${aggs.map((_, j) => `c${j}: 0, s${j}: 0, n${j}: 0, b${j}: null`).join(", ")}${aggs.length ? ", " : ""}first: null }`);
|
|
13142
|
+
if (!keys.length) {
|
|
13143
|
+
res = bs.compile`${res}if (single === null) { single = ${fresh}; open(single, r) } const g = single; `;
|
|
13144
|
+
} else {
|
|
13145
|
+
const key = (logic) => bs.compile`(p = ${read(logic)}) === undefined ? null : (p !== null && typeof p === "object") ? ${sync2(keyOf)}(p) : p`;
|
|
13146
|
+
if (keys.length === 1) {
|
|
13147
|
+
res = bs.compile`${res}let g; { const k = ${key(keys[0])}; if (typeof k === "number" && k >= 0 && k < 1048576 && (k | 0) === k) { g = ints[k]; if (g === undefined) { g = ${fresh}; open(g, r); ints[k] = g } } else { g = root.get(k); if (g === undefined) { g = ${fresh}; open(g, r); root.set(k, g) } } } `;
|
|
13148
|
+
}
|
|
13149
|
+
res = bs.compile`${res}${raw(keys.length === 1 ? "" : "let level = root; ")}`;
|
|
13150
|
+
for (let d = 0; keys.length > 1 && d < keys.length - 1; d++) {
|
|
13151
|
+
res = bs.compile`${res}{ const k = ${key(keys[d])}; let next = level.get(k); if (next === undefined) { next = new Map(); level.set(k, next) } level = next } `;
|
|
13152
|
+
}
|
|
13153
|
+
if (keys.length > 1) res = bs.compile`${res}let g; { const k = ${key(keys[keys.length - 1])}; g = level.get(k); if (g === undefined) { g = ${fresh}; open(g, r); level.set(k, g) } } `;
|
|
13154
|
+
}
|
|
13155
|
+
aggs.forEach((a, j) => {
|
|
13156
|
+
let body;
|
|
13157
|
+
if (a.star) body = raw(`g.c${j}++; `);
|
|
13158
|
+
else {
|
|
13159
|
+
const kindCode = a.kind === SUM || a.kind === AVG ? bs.compile`${raw('const x = typeof v === "number" ? v : ')}${sync2(toNumber)}(v); if (x !== null) ${raw(`{ g.s${j} += x; g.n${j}++ }`)} ` : a.kind === MIN || a.kind === MAX ? bs.compile`${raw(`if (g.b${j} === null || (typeof v === "number" && typeof g.b${j} === "number" ? v ${a.kind === MIN ? "<" : ">"} g.b${j} : `)}${sync2(sortCompare)}(v, ${raw(`g.b${j}`)}, false, null) ${raw(a.kind === MIN ? "< 0" : "> 0")})) ${raw(`g.b${j} = v; `)}` : raw("");
|
|
13160
|
+
body = bs.compile`${raw("const v = ")}${read(a.arg)}; if (v !== null && v !== undefined) { ${raw(`g.c${j}++; `)}${kindCode} } `;
|
|
13161
|
+
}
|
|
13162
|
+
if (a.filter !== null) body = bs.compile`if (${sync2(isTrue)}(${read(a.filter)})) { ${body} } `;
|
|
13163
|
+
res = bs.compile`${res}{ ${body} } `;
|
|
13164
|
+
});
|
|
13165
|
+
return bs.compile`${res}} })()`;
|
|
13166
|
+
},
|
|
13167
|
+
traverse: false,
|
|
13168
|
+
deterministic: false
|
|
13169
|
+
},
|
|
13170
|
+
// (Both scans declare their own `prev`, the engine's scratch variable, so the snippets inside
|
|
13171
|
+
// them use a local instead of the enclosing function's, which a closure would keep in memory.)
|
|
12633
13172
|
// A whole single-table scan as one function: [alias, where | null, row]. Compiled, the
|
|
12634
13173
|
// loop, the filter and the projection are one piece of code, with the rows passed in
|
|
12635
13174
|
// as `context.$scan`. Only used compiled; the interpreted path runs the loop itself.
|
|
@@ -12639,7 +13178,7 @@ var internal = {
|
|
|
12639
13178
|
},
|
|
12640
13179
|
compile: ([alias, where, row], bs) => {
|
|
12641
13180
|
const skip = where === null ? bs.compile`` : bs.compile`if (!${sync2(isTrue)}(${where})) continue;`;
|
|
12642
|
-
return bs.compile`(() => { const rows = context["$scan"]; const out = []; for (let i = 0; i < rows.length; i++) { if ((i & 1023) === 0) ${sync2(tick)}(Math.min(1024, rows.length - i)); context[${alias}] = rows[i]; ${skip} out.push(${row}) } return out })()`;
|
|
13181
|
+
return bs.compile`(() => { let prev; const rows = context["$scan"]; const out = []; for (let i = 0; i < rows.length; i++) { if ((i & 1023) === 0) ${sync2(tick)}(Math.min(1024, rows.length - i)); context[${alias}] = rows[i]; ${skip} out.push(${row}) } return out })()`;
|
|
12643
13182
|
},
|
|
12644
13183
|
traverse: false,
|
|
12645
13184
|
deterministic: false
|
|
@@ -12994,8 +13533,9 @@ function extend(env, aliases, alias, row) {
|
|
|
12994
13533
|
}
|
|
12995
13534
|
function runSelect(p, state, outer, keep = null) {
|
|
12996
13535
|
const base = outer ? Object.create(outer) : {};
|
|
12997
|
-
const projector = makeProjector(p, state);
|
|
12998
13536
|
const orderFns = p.orderBy ? p.orderBy.map((o) => fnOf(state, o.expr)) : null;
|
|
13537
|
+
const scan = orderFns === null && !p.grouped && p.having === null && scannable(p, state);
|
|
13538
|
+
const projector = makeProjector(p, state, scan);
|
|
12999
13539
|
const top = orderFns && keep !== null && !p.distinct ? topK(keep, comparatorFor(p.orderBy)) : null;
|
|
13000
13540
|
let items;
|
|
13001
13541
|
let plain = null;
|
|
@@ -13012,8 +13552,8 @@ function runSelect(p, state, outer, keep = null) {
|
|
|
13012
13552
|
});
|
|
13013
13553
|
items = top.best;
|
|
13014
13554
|
} else if (orderFns === null) {
|
|
13015
|
-
plain = scanRows(p, state, base);
|
|
13016
|
-
|
|
13555
|
+
if (scan) plain = scanRows(p, state, base);
|
|
13556
|
+
else {
|
|
13017
13557
|
plain = [];
|
|
13018
13558
|
streamRows(p, state, base, (env) => {
|
|
13019
13559
|
plain.push(projector.project(env));
|
|
@@ -13033,7 +13573,7 @@ function runSelect(p, state, outer, keep = null) {
|
|
|
13033
13573
|
} else {
|
|
13034
13574
|
let envs;
|
|
13035
13575
|
if (single && p.grouped) {
|
|
13036
|
-
envs = group(p, state, base, (visit) => streamRows(p, state, base, visit));
|
|
13576
|
+
envs = groupScannable(p, state) ? groupScan(p, state, base) : group(p, state, base, (visit) => streamRows(p, state, base, visit));
|
|
13037
13577
|
} else {
|
|
13038
13578
|
envs = [base];
|
|
13039
13579
|
for (const step2 of p.steps) envs = joinStep(step2, envs, base, state);
|
|
@@ -13098,9 +13638,47 @@ function sourceRows(p, state, base) {
|
|
|
13098
13638
|
const source = p.steps[0].source;
|
|
13099
13639
|
return source.kind === "expr" ? toRows(fnOf(state, source.expr)(base), false) : materialize(source, state);
|
|
13100
13640
|
}
|
|
13641
|
+
var groupLogics = /* @__PURE__ */ new WeakMap();
|
|
13642
|
+
function groupScannable(p, state) {
|
|
13643
|
+
return !state.interpreted && p.aggregates.every((spec) => INCREMENTAL.has(spec.name) && !spec.distinct && !spec.orderBy);
|
|
13644
|
+
}
|
|
13645
|
+
function groupScan(p, state, base) {
|
|
13646
|
+
let logic = groupLogics.get(p);
|
|
13647
|
+
if (!logic) {
|
|
13648
|
+
const aggs2 = p.aggregates.map((spec) => ({
|
|
13649
|
+
kind: KIND[spec.name],
|
|
13650
|
+
star: spec.star,
|
|
13651
|
+
arg: spec.star ? null : spec.args[0],
|
|
13652
|
+
filter: spec.filter
|
|
13653
|
+
}));
|
|
13654
|
+
groupLogics.set(p, logic = { GROUPSCAN: [p.steps[0].alias, p.where, p.groupBy ?? [], aggs2] });
|
|
13655
|
+
}
|
|
13656
|
+
const alias = p.steps[0].alias;
|
|
13657
|
+
const aggs = p.aggregates.map((spec) => ({ incremental: true, kind: KIND[spec.name] }));
|
|
13658
|
+
const list = [];
|
|
13659
|
+
const open = (g, row) => {
|
|
13660
|
+
g.first = snapshot(base);
|
|
13661
|
+
g.first[alias] = row;
|
|
13662
|
+
list.push(g);
|
|
13663
|
+
rows(list.length);
|
|
13664
|
+
};
|
|
13665
|
+
const env = snapshot(base);
|
|
13666
|
+
env.$scan = sourceRows(p, state, base);
|
|
13667
|
+
env.$grp = { root: /* @__PURE__ */ new Map(), open };
|
|
13668
|
+
fnOf(state, logic)(env);
|
|
13669
|
+
if (!(p.groupBy && p.groupBy.length) && list.length === 0) list.push({ first: base, accs: newAccumulators(aggs) });
|
|
13670
|
+
for (let i = 0; i < list.length; i++) {
|
|
13671
|
+
const g = list[i];
|
|
13672
|
+
if (g.accs) continue;
|
|
13673
|
+
g.accs = aggs.map((_, j) => ({ count: g[`c${j}`], sum: g[`s${j}`], numeric: g[`n${j}`], best: g[`b${j}`] }));
|
|
13674
|
+
}
|
|
13675
|
+
return finishGroups(list, aggs);
|
|
13676
|
+
}
|
|
13101
13677
|
var scanLogics = /* @__PURE__ */ new WeakMap();
|
|
13678
|
+
function scannable(p, state) {
|
|
13679
|
+
return !state.interpreted && p.row !== null && p.steps.length === 1 && p.steps[0].join === "FROM" && !p.windows.length;
|
|
13680
|
+
}
|
|
13102
13681
|
function scanRows(p, state, base) {
|
|
13103
|
-
if (state.interpreted || !p.row) return null;
|
|
13104
13682
|
let logic = scanLogics.get(p);
|
|
13105
13683
|
if (!logic) scanLogics.set(p, logic = { SCAN: [p.steps[0].alias, p.where, p.row] });
|
|
13106
13684
|
const env = snapshot(base);
|
|
@@ -13127,10 +13705,11 @@ function orderKeys(p, env, row, projector, orderFns) {
|
|
|
13127
13705
|
for (let k = 0; k < orderFns.length; k++) keys[k] = orderFns[k](env);
|
|
13128
13706
|
return keys;
|
|
13129
13707
|
}
|
|
13130
|
-
function makeProjector(p, state) {
|
|
13708
|
+
function makeProjector(p, state, skipBuild = false) {
|
|
13131
13709
|
const cols = p.columns;
|
|
13132
|
-
const exprFns = cols.map((c) => c.kind === "expr" ? fnOf(state, c.expr) : null);
|
|
13133
13710
|
const hasStar = cols.some((c) => c.kind === "star");
|
|
13711
|
+
const rowFn = !skipBuild && !hasStar && p.row ? fnOf(state, p.row) : null;
|
|
13712
|
+
const exprFns = skipBuild || rowFn ? [] : cols.map((c) => c.kind === "expr" ? fnOf(state, c.expr) : null);
|
|
13134
13713
|
const columnSet = /* @__PURE__ */ new Set();
|
|
13135
13714
|
const columns = [];
|
|
13136
13715
|
const addColumn = (name) => {
|
|
@@ -13141,7 +13720,6 @@ function makeProjector(p, state) {
|
|
|
13141
13720
|
};
|
|
13142
13721
|
if (!hasStar) for (const c of cols) addColumn(c.name);
|
|
13143
13722
|
const plain = cols.map((c) => c.kind === "expr" && c.name !== "__proto__");
|
|
13144
|
-
const rowFn = !hasStar && p.row ? fnOf(state, p.row) : null;
|
|
13145
13723
|
const project = rowFn ?? ((env) => {
|
|
13146
13724
|
const out = {};
|
|
13147
13725
|
for (let j = 0; j < cols.length; j++) {
|
|
@@ -13758,6 +14336,9 @@ function group(p, state, base, each) {
|
|
|
13758
14336
|
for (let i = 0; i < aggs.length; i++) accumulate(aggs[i], g.accs[i], env);
|
|
13759
14337
|
});
|
|
13760
14338
|
}
|
|
14339
|
+
return finishGroups(list, aggs);
|
|
14340
|
+
}
|
|
14341
|
+
function finishGroups(list, aggs) {
|
|
13761
14342
|
const out = new Array(list.length);
|
|
13762
14343
|
for (let gi = 0; gi < list.length; gi++) {
|
|
13763
14344
|
const g = list[gi];
|
|
@@ -14006,10 +14587,31 @@ function prepare(sql, options = {}) {
|
|
|
14006
14587
|
};
|
|
14007
14588
|
}
|
|
14008
14589
|
function query(sql, data, options = {}) {
|
|
14009
|
-
|
|
14590
|
+
const engine2 = options.engine ?? defaultEngine;
|
|
14591
|
+
return asRows(last(executePlan(planFor(sql, engine2, options), data, { ...options, engine: engine2 }).results));
|
|
14010
14592
|
}
|
|
14011
14593
|
function execute(sql, data, options = {}) {
|
|
14012
|
-
|
|
14594
|
+
const engine2 = options.engine ?? defaultEngine;
|
|
14595
|
+
return executePlan(planFor(sql, engine2, options), data, { ...options, engine: engine2 });
|
|
14596
|
+
}
|
|
14597
|
+
var plans = /* @__PURE__ */ new WeakMap();
|
|
14598
|
+
var PLAN_CACHE_SIZE = 256;
|
|
14599
|
+
var PLAN_CACHE_MAX_SQL = 8192;
|
|
14600
|
+
function planFor(sql, engine2, options) {
|
|
14601
|
+
const fresh = () => compile(sql, { functions: engine2.sqlFunctions, limits: options.limits });
|
|
14602
|
+
if (options.limits || typeof sql !== "string" || sql.length > PLAN_CACHE_MAX_SQL) return fresh();
|
|
14603
|
+
let cache = plans.get(engine2);
|
|
14604
|
+
if (!cache) plans.set(engine2, cache = /* @__PURE__ */ new Map());
|
|
14605
|
+
let plan = cache.get(sql);
|
|
14606
|
+
if (plan !== void 0) {
|
|
14607
|
+
cache.delete(sql);
|
|
14608
|
+
cache.set(sql, plan);
|
|
14609
|
+
return plan;
|
|
14610
|
+
}
|
|
14611
|
+
plan = fresh();
|
|
14612
|
+
cache.set(sql, plan);
|
|
14613
|
+
if (cache.size > PLAN_CACHE_SIZE) cache.delete(cache.keys().next().value);
|
|
14614
|
+
return plan;
|
|
14013
14615
|
}
|
|
14014
14616
|
function last(results) {
|
|
14015
14617
|
for (let i = results.length - 1; i >= 0; i--) if (!("inserted" in results[i])) return results[i];
|