From f092a0f1436f84c8eb046c5833cee1acddd19d3b Mon Sep 17 00:00:00 2001 From: MrCoder Date: Sun, 2 Nov 2025 16:20:38 +1100 Subject: [PATCH] feat: implement title as an identifier with validation and parsing support --- src/g4/sequenceLexer.g4 | 28 +- src/generated-parser/sequenceLexer.js | 798 +++++++++++---------- src/generated-parser/sequenceLexer.tokens | 1 - src/generated-parser/sequenceParser.js | 16 +- src/generated-parser/sequenceParser.tokens | 1 - src/parser/Title/Title.spec.ts | 55 +- 6 files changed, 505 insertions(+), 394 deletions(-) diff --git a/src/g4/sequenceLexer.g4 b/src/g4/sequenceLexer.g4 index 54f7345f..efddf7da 100644 --- a/src/g4/sequenceLexer.g4 +++ b/src/g4/sequenceLexer.g4 @@ -4,6 +4,32 @@ channels { MODIFIER_CHANNEL } +@members { + // 1. title must be at the beginning + // 2. title must not be followed by '.', '(', '=' + this.isTitle = function() { + // Check if 'title' appears at the beginning (only whitespace/comments before it) + const currentPos = this._tokenStartCharIndex; + const preceding = this._input.getText(0, currentPos - 1) + .replace(/\/\/[^\n]*(?:\n|$)/g, '') + .trim(); + if (preceding.length) return false; + + // Look ahead past 'title' and any whitespace to check what follows + const SPACE = 32, TAB = 9, EOF = -1, DOT = 46, EQUALS = 61, OPEN_PAREN = 40; + let pos = 6, next = this._input.LA(pos); + + // Skip past any whitespace + while (next === SPACE || next === TAB) { + ++pos; + next = this._input.LA(pos); + } + + // Title directive if EOF or not followed by '.', '(', '=' + return next === EOF || (next !== DOT && next !== EQUALS && next !== OPEN_PAREN); + }; +} + fragment HWS: [ \t]; // Horizontal WhiteSpace WS: HWS+ -> channel(HIDDEN); @@ -16,7 +42,7 @@ STATIC: 'static' -> channel(MODIFIER_CHANNEL); AWAIT: 'await' -> channel(MODIFIER_CHANNEL); TITLE - : 'title' -> pushMode(TITLE_MODE) + : {this.isTitle()}? 'title' -> pushMode(TITLE_MODE) ; COL diff --git a/src/generated-parser/sequenceLexer.js b/src/generated-parser/sequenceLexer.js index 02b34561..c46c2e8a 100644 --- a/src/generated-parser/sequenceLexer.js +++ b/src/generated-parser/sequenceLexer.js @@ -3,7 +3,7 @@ import antlr4 from 'antlr4'; -const serializedATN = [4,0,71,585,6,-1,6,-1,6,-1,2,0,7,0,2,1,7,1,2,2,7,2, +const serializedATN = [4,0,71,586,6,-1,6,-1,6,-1,2,0,7,0,2,1,7,1,2,2,7,2, 2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7, 11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18, 2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2, @@ -16,389 +16,389 @@ const serializedATN = [4,0,71,585,6,-1,6,-1,6,-1,2,0,7,0,2,1,7,1,2,2,7,2, 69,2,70,7,70,2,71,7,71,2,72,7,72,2,73,7,73,2,74,7,74,1,0,1,0,1,1,4,1,157, 8,1,11,1,12,1,158,1,1,1,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1, 3,1,3,1,3,1,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,1, -5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1, -7,1,8,1,8,1,8,1,9,1,9,1,9,1,10,1,10,1,10,1,11,1,11,1,12,1,12,4,12,224,8, -12,11,12,12,12,225,1,13,1,13,1,13,1,14,1,14,1,14,1,15,1,15,1,15,1,16,1,16, -1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,19,1,20,1,20,1,20,1,21,1,21,1,22,1, -22,1,23,1,23,1,24,1,24,1,25,1,25,1,26,1,26,1,27,1,27,1,28,1,28,1,29,1,29, -1,30,1,30,1,31,1,31,1,32,1,32,1,33,1,33,1,34,1,34,1,35,1,35,1,35,1,35,1, -35,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,37,1,37,3,37, -296,8,37,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40,1,40, +5,1,5,1,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,7,1,7,1, +7,1,7,1,8,1,8,1,8,1,9,1,9,1,9,1,10,1,10,1,10,1,11,1,11,1,12,1,12,4,12,225, +8,12,11,12,12,12,226,1,13,1,13,1,13,1,14,1,14,1,14,1,15,1,15,1,15,1,16,1, +16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,19,1,20,1,20,1,20,1,21,1,21,1,22, +1,22,1,23,1,23,1,24,1,24,1,25,1,25,1,26,1,26,1,27,1,27,1,28,1,28,1,29,1, +29,1,30,1,30,1,31,1,31,1,32,1,32,1,33,1,33,1,34,1,34,1,35,1,35,1,35,1,35, +1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,37,1,37,3, +37,297,8,37,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,40, 1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,1, -40,1,40,1,40,1,40,1,40,1,40,1,40,3,40,332,8,40,1,41,1,41,1,41,1,41,1,41, -1,41,1,41,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1, -44,1,44,1,45,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46, -1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,3,47,380,8,47, -1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,51,1,51,1,51,1, -51,1,51,1,51,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,53,1,53,1,53,1,54, +40,1,40,1,40,1,40,1,40,1,40,1,40,1,40,3,40,333,8,40,1,41,1,41,1,41,1,41, +1,41,1,41,1,41,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1, +44,1,44,1,44,1,45,1,45,1,45,1,45,1,46,1,46,1,46,1,46,1,46,1,46,1,46,1,46, +1,46,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,1,47,3,47,381, +8,47,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,50,1,50,1,50,1,50,1,51,1,51,1, +51,1,51,1,51,1,51,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,52,1,53,1,53,1,53, 1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1,54,1, -54,3,54,426,8,54,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55, +54,1,54,3,54,427,8,54,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55, 1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1,55,1, -55,3,55,454,8,55,1,56,1,56,5,56,458,8,56,10,56,12,56,461,9,56,1,57,1,57, -1,58,1,58,5,58,467,8,58,10,58,12,58,470,9,58,1,59,4,59,473,8,59,11,59,12, -59,474,1,60,1,60,1,61,4,61,480,8,61,11,61,12,61,481,1,62,4,62,485,8,62,11, -62,12,62,486,1,62,1,62,5,62,491,8,62,10,62,12,62,494,9,62,1,62,1,62,4,62, -498,8,62,11,62,12,62,499,3,62,502,8,62,1,63,1,63,1,63,3,63,507,8,63,1,64, -1,64,3,64,511,8,64,1,64,1,64,1,65,1,65,1,65,1,65,5,65,519,8,65,10,65,12, -65,522,9,65,1,65,1,65,1,66,1,66,1,66,1,66,5,66,530,8,66,10,66,12,66,533, -9,66,1,67,1,67,1,67,1,67,1,68,1,68,1,68,1,68,5,68,543,8,68,10,68,12,68,546, -9,68,1,68,1,68,1,69,1,69,1,70,1,70,5,70,554,8,70,10,70,12,70,557,9,70,1, -70,1,70,1,70,1,70,5,70,563,8,70,10,70,12,70,566,9,70,1,71,4,71,569,8,71, -11,71,12,71,570,1,72,1,72,1,72,1,72,1,73,4,73,578,8,73,11,73,12,73,579,1, -74,1,74,1,74,1,74,0,0,75,3,0,5,1,7,2,9,3,11,4,13,5,15,6,17,7,19,8,21,9,23, -10,25,0,27,11,29,12,31,13,33,14,35,15,37,16,39,17,41,18,43,19,45,20,47,21, -49,22,51,23,53,24,55,25,57,26,59,27,61,28,63,29,65,30,67,31,69,32,71,33, -73,34,75,35,77,36,79,37,81,38,83,39,85,40,87,41,89,42,91,43,93,44,95,45, -97,46,99,47,101,48,103,49,105,50,107,51,109,52,111,53,113,54,115,55,117, -56,119,57,121,0,123,0,125,58,127,59,129,60,131,61,133,62,135,63,137,64,139, -65,141,66,143,67,145,68,147,69,149,70,151,71,3,0,1,2,9,2,0,9,9,32,32,3,0, -48,57,65,70,97,102,4,0,48,57,65,90,95,95,97,122,649,0,65,90,95,95,97,122, -170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748, -750,750,880,884,886,887,890,893,895,895,902,902,904,906,908,908,910,929, -931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514,1519, -1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788, -1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042, -2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2144,2154,2160,2183, -2185,2190,2208,2249,2308,2361,2365,2365,2384,2384,2392,2401,2417,2432,2437, -2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510, -2524,2525,2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600,2602, -2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701, -2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784, -2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873, -2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962, -2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024, +55,1,55,3,55,455,8,55,1,56,1,56,5,56,459,8,56,10,56,12,56,462,9,56,1,57, +1,57,1,58,1,58,5,58,468,8,58,10,58,12,58,471,9,58,1,59,4,59,474,8,59,11, +59,12,59,475,1,60,1,60,1,61,4,61,481,8,61,11,61,12,61,482,1,62,4,62,486, +8,62,11,62,12,62,487,1,62,1,62,5,62,492,8,62,10,62,12,62,495,9,62,1,62,1, +62,4,62,499,8,62,11,62,12,62,500,3,62,503,8,62,1,63,1,63,1,63,3,63,508,8, +63,1,64,1,64,3,64,512,8,64,1,64,1,64,1,65,1,65,1,65,1,65,5,65,520,8,65,10, +65,12,65,523,9,65,1,65,1,65,1,66,1,66,1,66,1,66,5,66,531,8,66,10,66,12,66, +534,9,66,1,67,1,67,1,67,1,67,1,68,1,68,1,68,1,68,5,68,544,8,68,10,68,12, +68,547,9,68,1,68,1,68,1,69,1,69,1,70,1,70,5,70,555,8,70,10,70,12,70,558, +9,70,1,70,1,70,1,70,1,70,5,70,564,8,70,10,70,12,70,567,9,70,1,71,4,71,570, +8,71,11,71,12,71,571,1,72,1,72,1,72,1,72,1,73,4,73,579,8,73,11,73,12,73, +580,1,74,1,74,1,74,1,74,0,0,75,3,0,5,1,7,2,9,3,11,4,13,5,15,6,17,7,19,8, +21,9,23,10,25,0,27,11,29,12,31,13,33,14,35,15,37,16,39,17,41,18,43,19,45, +20,47,21,49,22,51,23,53,24,55,25,57,26,59,27,61,28,63,29,65,30,67,31,69, +32,71,33,73,34,75,35,77,36,79,37,81,38,83,39,85,40,87,41,89,42,91,43,93, +44,95,45,97,46,99,47,101,48,103,49,105,50,107,51,109,52,111,53,113,54,115, +55,117,56,119,57,121,0,123,0,125,58,127,59,129,60,131,61,133,62,135,63,137, +64,139,65,141,66,143,67,145,68,147,69,149,70,151,71,3,0,1,2,9,2,0,9,9,32, +32,3,0,48,57,65,70,97,102,4,0,48,57,65,90,95,95,97,122,649,0,65,90,95,95, +97,122,170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748, +748,750,750,880,884,886,887,890,893,895,895,902,902,904,906,908,908,910, +929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376,1416,1488,1514, +1519,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786, +1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037, +2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2144,2154,2160, +2183,2185,2190,2208,2249,2308,2361,2365,2365,2384,2384,2392,2401,2417,2432, +2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510, +2510,2524,2525,2527,2529,2544,2545,2556,2556,2565,2570,2575,2576,2579,2600, +2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693, +2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768, +2784,2785,2809,2809,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869, +2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960, +2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024, +3024,3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3165,3165, +3168,3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261, +3261,3293,3294,3296,3297,3313,3314,3332,3340,3342,3344,3346,3386,3389,3389, +3406,3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517, +3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3718,3722, +3724,3747,3749,3749,3751,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804, +3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181, +4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295, +4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701, +4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808, +4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740, +5743,5759,5761,5786,5792,5866,5873,5880,5888,5905,5919,5937,5952,5969,5984, +5996,5998,6000,6016,6067,6103,6103,6108,6108,6176,6264,6272,6276,6279,6312, +6314,6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656, +6678,6688,6740,6823,6823,6917,6963,6981,6988,7043,7072,7086,7087,7098,7141, +7168,7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406, +7411,7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013, +8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126, +8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188, +8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473, +8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521, +8526,8526,8579,8580,11264,11492,11499,11502,11506,11507,11520,11557,11559, +11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688, +11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736, +11742,11823,11823,12293,12294,12337,12341,12347,12348,12353,12438,12445, +12447,12449,12538,12540,12543,12549,12591,12593,12686,12704,12735,12784, +12799,13312,19903,19968,42124,42192,42237,42240,42508,42512,42527,42538, +42539,42560,42606,42623,42653,42656,42725,42775,42783,42786,42888,42891, +42954,42960,42961,42963,42963,42965,42969,42994,43009,43011,43013,43015, +43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43261, +43262,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488, +43492,43494,43503,43514,43518,43520,43560,43584,43586,43588,43595,43616, +43638,43642,43642,43646,43695,43697,43697,43701,43702,43705,43709,43712, +43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785, +43790,43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888, +44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256, +64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318, +64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914, +64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382, +65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549, +65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,66176, +66204,66208,66256,66304,66335,66349,66368,66370,66377,66384,66421,66432, +66461,66464,66499,66504,66511,66560,66717,66736,66771,66776,66811,66816, +66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967, +66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424, +67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594, +67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808, +67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096, +68096,68112,68115,68117,68119,68121,68149,68192,68220,68224,68252,68288, +68295,68297,68324,68352,68405,68416,68437,68448,68466,68480,68497,68608, +68680,68736,68786,68800,68850,68864,68899,69248,69289,69296,69297,69376, +69404,69415,69415,69424,69445,69488,69505,69552,69572,69600,69622,69635, +69687,69745,69746,69749,69749,69763,69807,69840,69864,69891,69926,69956, +69956,69959,69959,69968,70002,70006,70006,70019,70066,70081,70084,70106, +70106,70108,70108,70144,70161,70163,70187,70272,70278,70280,70280,70282, +70285,70287,70301,70303,70312,70320,70366,70405,70412,70415,70416,70419, +70440,70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493, +70497,70656,70708,70727,70730,70751,70753,70784,70831,70852,70853,70855, +70855,71040,71086,71128,71131,71168,71215,71236,71236,71296,71338,71352, +71352,71424,71450,71488,71494,71680,71723,71840,71903,71935,71942,71945, +71945,71948,71955,71957,71958,71960,71983,71999,71999,72001,72001,72096, +72103,72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250, +72250,72272,72272,72284,72329,72349,72349,72368,72440,72704,72712,72714, +72750,72768,72768,72818,72847,72960,72966,72968,72969,72971,73008,73030, +73030,73056,73061,73063,73064,73066,73097,73112,73112,73440,73458,73648, +73648,73728,74649,74880,75075,77712,77808,77824,78894,82944,83526,92160, +92728,92736,92766,92784,92862,92880,92909,92928,92975,92992,92995,93027, +93047,93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176, +94177,94179,94179,94208,100343,100352,101589,101632,101640,110576,110579, +110581,110587,110589,110590,110592,110882,110928,110930,110948,110951,110960, +111355,113664,113770,113776,113788,113792,113800,113808,113817,119808,119892, +119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982, +119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084, +120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138, +120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596, +120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746, +120770,120772,120779,122624,122654,123136,123180,123191,123197,123214,123214, +123536,123565,123584,123627,124896,124902,124904,124907,124909,124910,124912, +124926,124928,125124,125184,125251,125259,125259,126464,126467,126469,126495, +126497,126498,126500,126500,126503,126503,126505,126514,126516,126519,126521, +126521,126523,126523,126530,126530,126535,126535,126537,126537,126539,126539, +126541,126543,126545,126546,126548,126548,126551,126551,126553,126553,126555, +126555,126557,126557,126559,126559,126561,126562,126564,126564,126567,126570, +126572,126578,126580,126583,126585,126588,126590,126590,126592,126601,126603, +126619,126625,126627,126629,126633,126635,126651,131072,173791,173824,177976, +177984,178205,178208,183969,183984,191456,194560,195101,196608,201546,693, +0,48,57,65,90,95,95,97,122,170,170,181,181,186,186,192,214,216,246,248,705, +710,721,736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902, +904,906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369, +1376,1416,1488,1514,1519,1522,1568,1610,1632,1641,1646,1647,1649,1747,1749, +1749,1765,1766,1774,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969, +1984,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112, +2136,2144,2154,2160,2183,2185,2190,2208,2249,2308,2361,2365,2365,2384,2384, +2392,2401,2406,2415,2417,2432,2437,2444,2447,2448,2451,2472,2474,2480,2482, +2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2534,2545,2556,2556, +2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649, +2652,2654,2654,2662,2671,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736, +2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2790,2799,2809,2809,2821, +2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909, +2911,2913,2918,2927,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969, +2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3046,3055, 3077,3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3165,3165,3168, -3169,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261, -3293,3294,3296,3297,3313,3314,3332,3340,3342,3344,3346,3386,3389,3389,3406, -3406,3412,3414,3423,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517, -3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3718,3722,3724, -3747,3749,3749,3751,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807, -3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186, -4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295, -4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704, -4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822, -4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743, -5759,5761,5786,5792,5866,5873,5880,5888,5905,5919,5937,5952,5969,5984,5996, -5998,6000,6016,6067,6103,6103,6108,6108,6176,6264,6272,6276,6279,6312,6314, -6314,6320,6389,6400,6430,6480,6509,6512,6516,6528,6571,6576,6601,6656,6678, -6688,6740,6823,6823,6917,6963,6981,6988,7043,7072,7086,7087,7098,7141,7168, -7203,7245,7247,7258,7293,7296,7304,7312,7354,7357,7359,7401,7404,7406,7411, -7413,7414,7418,7418,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016, -8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126, -8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305, -8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477, -8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526, -8526,8579,8580,11264,11492,11499,11502,11506,11507,11520,11557,11559,11559, -11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694, -11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742, -11823,11823,12293,12294,12337,12341,12347,12348,12353,12438,12445,12447, -12449,12538,12540,12543,12549,12591,12593,12686,12704,12735,12784,12799, -13312,19903,19968,42124,42192,42237,42240,42508,42512,42527,42538,42539, -42560,42606,42623,42653,42656,42725,42775,42783,42786,42888,42891,42954, -42960,42961,42963,42963,42965,42969,42994,43009,43011,43013,43015,43018, -43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43261,43262, -43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43488,43492, -43494,43503,43514,43518,43520,43560,43584,43586,43588,43595,43616,43638, -43642,43642,43646,43695,43697,43697,43701,43702,43705,43709,43712,43712, -43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790, -43793,43798,43808,43814,43816,43822,43824,43866,43868,43881,43888,44002, -44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262, -64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318, -64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967, -65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470, -65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574, -65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,66176,66204, -66208,66256,66304,66335,66349,66368,66370,66377,66384,66421,66432,66461, -66464,66499,66504,66511,66560,66717,66736,66771,66776,66811,66816,66855, -66864,66915,66928,66938,66940,66954,66956,66962,66964,66965,66967,66977, -66979,66993,66995,67001,67003,67004,67072,67382,67392,67413,67424,67431, -67456,67461,67463,67504,67506,67514,67584,67589,67592,67592,67594,67637, -67639,67640,67644,67644,67647,67669,67680,67702,67712,67742,67808,67826, -67828,67829,67840,67861,67872,67897,67968,68023,68030,68031,68096,68096, -68112,68115,68117,68119,68121,68149,68192,68220,68224,68252,68288,68295, -68297,68324,68352,68405,68416,68437,68448,68466,68480,68497,68608,68680, -68736,68786,68800,68850,68864,68899,69248,69289,69296,69297,69376,69404, -69415,69415,69424,69445,69488,69505,69552,69572,69600,69622,69635,69687, -69745,69746,69749,69749,69763,69807,69840,69864,69891,69926,69956,69956, -69959,69959,69968,70002,70006,70006,70019,70066,70081,70084,70106,70106, -70108,70108,70144,70161,70163,70187,70272,70278,70280,70280,70282,70285, -70287,70301,70303,70312,70320,70366,70405,70412,70415,70416,70419,70440, -70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493,70497, -70656,70708,70727,70730,70751,70753,70784,70831,70852,70853,70855,70855, -71040,71086,71128,71131,71168,71215,71236,71236,71296,71338,71352,71352, -71424,71450,71488,71494,71680,71723,71840,71903,71935,71942,71945,71945, -71948,71955,71957,71958,71960,71983,71999,71999,72001,72001,72096,72103, -72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250,72250, -72272,72272,72284,72329,72349,72349,72368,72440,72704,72712,72714,72750, -72768,72768,72818,72847,72960,72966,72968,72969,72971,73008,73030,73030, -73056,73061,73063,73064,73066,73097,73112,73112,73440,73458,73648,73648, -73728,74649,74880,75075,77712,77808,77824,78894,82944,83526,92160,92728, -92736,92766,92784,92862,92880,92909,92928,92975,92992,92995,93027,93047, -93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176,94177, -94179,94179,94208,100343,100352,101589,101632,101640,110576,110579,110581, -110587,110589,110590,110592,110882,110928,110930,110948,110951,110960,111355, -113664,113770,113776,113788,113792,113800,113808,113817,119808,119892,119894, -119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993, -119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086, -120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144, -120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598, -120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770, -120772,120779,122624,122654,123136,123180,123191,123197,123214,123214,123536, -123565,123584,123627,124896,124902,124904,124907,124909,124910,124912,124926, -124928,125124,125184,125251,125259,125259,126464,126467,126469,126495,126497, -126498,126500,126500,126503,126503,126505,126514,126516,126519,126521,126521, -126523,126523,126530,126530,126535,126535,126537,126537,126539,126539,126541, -126543,126545,126546,126548,126548,126551,126551,126553,126553,126555,126555, -126557,126557,126559,126559,126561,126562,126564,126564,126567,126570,126572, -126578,126580,126583,126585,126588,126590,126590,126592,126601,126603,126619, -126625,126627,126629,126633,126635,126651,131072,173791,173824,177976,177984, -178205,178208,183969,183984,191456,194560,195101,196608,201546,693,0,48, -57,65,90,95,95,97,122,170,170,181,181,186,186,192,214,216,246,248,705,710, -721,736,740,748,748,750,750,880,884,886,887,890,893,895,895,902,902,904, -906,908,908,910,929,931,1013,1015,1153,1162,1327,1329,1366,1369,1369,1376, -1416,1488,1514,1519,1522,1568,1610,1632,1641,1646,1647,1649,1747,1749,1749, -1765,1766,1774,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1984, -2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136, -2144,2154,2160,2183,2185,2190,2208,2249,2308,2361,2365,2365,2384,2384,2392, -2401,2406,2415,2417,2432,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482, -2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2534,2545,2556,2556,2565, -2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652, -2654,2654,2662,2671,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738, -2739,2741,2745,2749,2749,2768,2768,2784,2785,2790,2799,2809,2809,2821,2828, -2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911, -2913,2918,2927,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970, -2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3046,3055,3077, -3084,3086,3088,3090,3112,3114,3129,3133,3133,3160,3162,3165,3165,3168,3169, -3174,3183,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261, -3261,3293,3294,3296,3297,3302,3311,3313,3314,3332,3340,3342,3344,3346,3386, -3389,3389,3406,3406,3412,3414,3423,3425,3430,3439,3450,3455,3461,3478,3482, -3505,3507,3515,3517,3517,3520,3526,3558,3567,3585,3632,3634,3635,3648,3654, -3664,3673,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760,3762, -3763,3773,3773,3776,3780,3782,3782,3792,3801,3804,3807,3840,3840,3872,3881, -3904,3911,3913,3948,3976,3980,4096,4138,4159,4169,4176,4181,4186,4189,4193, -4193,4197,4198,4206,4208,4213,4225,4238,4238,4240,4249,4256,4293,4295,4295, -4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704, -4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822, -4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740,5743, -5759,5761,5786,5792,5866,5873,5880,5888,5905,5919,5937,5952,5969,5984,5996, -5998,6000,6016,6067,6103,6103,6108,6108,6112,6121,6160,6169,6176,6264,6272, -6276,6279,6312,6314,6314,6320,6389,6400,6430,6470,6509,6512,6516,6528,6571, -6576,6601,6608,6617,6656,6678,6688,6740,6784,6793,6800,6809,6823,6823,6917, -6963,6981,6988,6992,7001,7043,7072,7086,7141,7168,7203,7232,7241,7245,7293, -7296,7304,7312,7354,7357,7359,7401,7404,7406,7411,7413,7414,7418,7418,7424, -7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027, -8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144, -8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348, -8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488, -8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8579,8580,11264,11492, -11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623, -11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710, -11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12294, -12337,12341,12347,12348,12353,12438,12445,12447,12449,12538,12540,12543, -12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968,42124, -42192,42237,42240,42508,42512,42539,42560,42606,42623,42653,42656,42725, -42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965,42969, -42994,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187, -43216,43225,43250,43255,43259,43259,43261,43262,43264,43301,43312,43334, -43360,43388,43396,43442,43471,43481,43488,43492,43494,43518,43520,43560, -43584,43586,43588,43595,43600,43609,43616,43638,43642,43642,43646,43695, -43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741, -43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814, -43816,43822,43824,43866,43868,43881,43888,44002,44016,44025,44032,55203, -55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279, -64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321, -64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019, -65136,65140,65142,65276,65296,65305,65313,65338,65345,65370,65382,65470, -65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549,65574, -65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,66176,66204, -66208,66256,66304,66335,66349,66368,66370,66377,66384,66421,66432,66461, -66464,66499,66504,66511,66560,66717,66720,66729,66736,66771,66776,66811, -66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964,66965, -66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392,67413, -67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592,67592, -67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712,67742, -67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030,68031, -68096,68096,68112,68115,68117,68119,68121,68149,68192,68220,68224,68252, -68288,68295,68297,68324,68352,68405,68416,68437,68448,68466,68480,68497, -68608,68680,68736,68786,68800,68850,68864,68899,68912,68921,69248,69289, -69296,69297,69376,69404,69415,69415,69424,69445,69488,69505,69552,69572, -69600,69622,69635,69687,69734,69743,69745,69746,69749,69749,69763,69807, -69840,69864,69872,69881,69891,69926,69942,69951,69956,69956,69959,69959, -69968,70002,70006,70006,70019,70066,70081,70084,70096,70106,70108,70108, -70144,70161,70163,70187,70272,70278,70280,70280,70282,70285,70287,70301, -70303,70312,70320,70366,70384,70393,70405,70412,70415,70416,70419,70440, -70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493,70497, -70656,70708,70727,70730,70736,70745,70751,70753,70784,70831,70852,70853, -70855,70855,70864,70873,71040,71086,71128,71131,71168,71215,71236,71236, -71248,71257,71296,71338,71352,71352,71360,71369,71424,71450,71472,71481, -71488,71494,71680,71723,71840,71913,71935,71942,71945,71945,71948,71955, -71957,71958,71960,71983,71999,71999,72001,72001,72016,72025,72096,72103, -72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250,72250, -72272,72272,72284,72329,72349,72349,72368,72440,72704,72712,72714,72750, -72768,72768,72784,72793,72818,72847,72960,72966,72968,72969,72971,73008, -73030,73030,73040,73049,73056,73061,73063,73064,73066,73097,73112,73112, -73120,73129,73440,73458,73648,73648,73728,74649,74880,75075,77712,77808, -77824,78894,82944,83526,92160,92728,92736,92766,92768,92777,92784,92862, -92864,92873,92880,92909,92928,92975,92992,92995,93008,93017,93027,93047, -93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176,94177, -94179,94179,94208,100343,100352,101589,101632,101640,110576,110579,110581, -110587,110589,110590,110592,110882,110928,110930,110948,110951,110960,111355, -113664,113770,113776,113788,113792,113800,113808,113817,119808,119892,119894, -119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993, -119995,119995,119997,120003,120005,120069,120071,120074,120077,120084,120086, -120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144, -120146,120485,120488,120512,120514,120538,120540,120570,120572,120596,120598, -120628,120630,120654,120656,120686,120688,120712,120714,120744,120746,120770, -120772,120779,120782,120831,122624,122654,123136,123180,123191,123197,123200, -123209,123214,123214,123536,123565,123584,123627,123632,123641,124896,124902, -124904,124907,124909,124910,124912,124926,124928,125124,125184,125251,125259, -125259,125264,125273,126464,126467,126469,126495,126497,126498,126500,126500, -126503,126503,126505,126514,126516,126519,126521,126521,126523,126523,126530, -126530,126535,126535,126537,126537,126539,126539,126541,126543,126545,126546, -126548,126548,126551,126551,126553,126553,126555,126555,126557,126557,126559, -126559,126561,126562,126564,126564,126567,126570,126572,126578,126580,126583, -126585,126588,126590,126590,126592,126601,126603,126619,126625,126627,126629, -126633,126635,126651,130032,130041,131072,173791,173824,177976,177984,178205, -178208,183969,183984,191456,194560,195101,196608,201546,2,0,65,90,97,122, -1,0,48,57,3,0,10,10,13,13,34,34,2,0,10,10,13,13,609,0,5,1,0,0,0,0,7,1,0, -0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19, -1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0, -0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1, -0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0, -55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0, -0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77, -1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0, -0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1, -0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0, -0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1,0,0, -0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0,0,0, -0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1,0,0,0,1, -145,1,0,0,0,1,147,1,0,0,0,2,149,1,0,0,0,2,151,1,0,0,0,3,153,1,0,0,0,5,156, -1,0,0,0,7,162,1,0,0,0,9,170,1,0,0,0,11,181,1,0,0,0,13,190,1,0,0,0,15,198, -1,0,0,0,17,206,1,0,0,0,19,210,1,0,0,0,21,213,1,0,0,0,23,216,1,0,0,0,25,219, -1,0,0,0,27,221,1,0,0,0,29,227,1,0,0,0,31,230,1,0,0,0,33,233,1,0,0,0,35,236, -1,0,0,0,37,239,1,0,0,0,39,241,1,0,0,0,41,243,1,0,0,0,43,246,1,0,0,0,45,249, -1,0,0,0,47,251,1,0,0,0,49,253,1,0,0,0,51,255,1,0,0,0,53,257,1,0,0,0,55,259, -1,0,0,0,57,261,1,0,0,0,59,263,1,0,0,0,61,265,1,0,0,0,63,267,1,0,0,0,65,269, -1,0,0,0,67,271,1,0,0,0,69,273,1,0,0,0,71,275,1,0,0,0,73,277,1,0,0,0,75,282, -1,0,0,0,77,295,1,0,0,0,79,297,1,0,0,0,81,300,1,0,0,0,83,331,1,0,0,0,85,333, -1,0,0,0,87,340,1,0,0,0,89,344,1,0,0,0,91,348,1,0,0,0,93,354,1,0,0,0,95,358, -1,0,0,0,97,379,1,0,0,0,99,381,1,0,0,0,101,385,1,0,0,0,103,388,1,0,0,0,105, -392,1,0,0,0,107,398,1,0,0,0,109,406,1,0,0,0,111,425,1,0,0,0,113,453,1,0, -0,0,115,455,1,0,0,0,117,462,1,0,0,0,119,464,1,0,0,0,121,472,1,0,0,0,123, -476,1,0,0,0,125,479,1,0,0,0,127,501,1,0,0,0,129,503,1,0,0,0,131,510,1,0, -0,0,133,514,1,0,0,0,135,525,1,0,0,0,137,534,1,0,0,0,139,538,1,0,0,0,141, -549,1,0,0,0,143,551,1,0,0,0,145,568,1,0,0,0,147,572,1,0,0,0,149,577,1,0, -0,0,151,581,1,0,0,0,153,154,7,0,0,0,154,4,1,0,0,0,155,157,3,3,0,0,156,155, -1,0,0,0,157,158,1,0,0,0,158,156,1,0,0,0,158,159,1,0,0,0,159,160,1,0,0,0, -160,161,6,1,0,0,161,6,1,0,0,0,162,163,5,99,0,0,163,164,5,111,0,0,164,165, -5,110,0,0,165,166,5,115,0,0,166,167,5,116,0,0,167,168,1,0,0,0,168,169,6, -2,1,0,169,8,1,0,0,0,170,171,5,114,0,0,171,172,5,101,0,0,172,173,5,97,0,0, -173,174,5,100,0,0,174,175,5,111,0,0,175,176,5,110,0,0,176,177,5,108,0,0, -177,178,5,121,0,0,178,179,1,0,0,0,179,180,6,3,1,0,180,10,1,0,0,0,181,182, -5,115,0,0,182,183,5,116,0,0,183,184,5,97,0,0,184,185,5,116,0,0,185,186,5, -105,0,0,186,187,5,99,0,0,187,188,1,0,0,0,188,189,6,4,1,0,189,12,1,0,0,0, -190,191,5,97,0,0,191,192,5,119,0,0,192,193,5,97,0,0,193,194,5,105,0,0,194, -195,5,116,0,0,195,196,1,0,0,0,196,197,6,5,1,0,197,14,1,0,0,0,198,199,5,116, -0,0,199,200,5,105,0,0,200,201,5,116,0,0,201,202,5,108,0,0,202,203,5,101, -0,0,203,204,1,0,0,0,204,205,6,6,2,0,205,16,1,0,0,0,206,207,5,58,0,0,207, -208,1,0,0,0,208,209,6,7,3,0,209,18,1,0,0,0,210,211,5,60,0,0,211,212,5,60, -0,0,212,20,1,0,0,0,213,214,5,62,0,0,214,215,5,62,0,0,215,22,1,0,0,0,216, -217,5,45,0,0,217,218,5,62,0,0,218,24,1,0,0,0,219,220,7,1,0,0,220,26,1,0, -0,0,221,223,5,35,0,0,222,224,3,25,11,0,223,222,1,0,0,0,224,225,1,0,0,0,225, -223,1,0,0,0,225,226,1,0,0,0,226,28,1,0,0,0,227,228,5,124,0,0,228,229,5,124, -0,0,229,30,1,0,0,0,230,231,5,38,0,0,231,232,5,38,0,0,232,32,1,0,0,0,233, -234,5,61,0,0,234,235,5,61,0,0,235,34,1,0,0,0,236,237,5,33,0,0,237,238,5, -61,0,0,238,36,1,0,0,0,239,240,5,62,0,0,240,38,1,0,0,0,241,242,5,60,0,0,242, -40,1,0,0,0,243,244,5,62,0,0,244,245,5,61,0,0,245,42,1,0,0,0,246,247,5,60, -0,0,247,248,5,61,0,0,248,44,1,0,0,0,249,250,5,43,0,0,250,46,1,0,0,0,251, -252,5,45,0,0,252,48,1,0,0,0,253,254,5,42,0,0,254,50,1,0,0,0,255,256,5,47, -0,0,256,52,1,0,0,0,257,258,5,37,0,0,258,54,1,0,0,0,259,260,5,94,0,0,260, -56,1,0,0,0,261,262,5,33,0,0,262,58,1,0,0,0,263,264,5,59,0,0,264,60,1,0,0, -0,265,266,5,44,0,0,266,62,1,0,0,0,267,268,5,61,0,0,268,64,1,0,0,0,269,270, -5,40,0,0,270,66,1,0,0,0,271,272,5,41,0,0,272,68,1,0,0,0,273,274,5,123,0, -0,274,70,1,0,0,0,275,276,5,125,0,0,276,72,1,0,0,0,277,278,5,116,0,0,278, -279,5,114,0,0,279,280,5,117,0,0,280,281,5,101,0,0,281,74,1,0,0,0,282,283, -5,102,0,0,283,284,5,97,0,0,284,285,5,108,0,0,285,286,5,115,0,0,286,287,5, -101,0,0,287,76,1,0,0,0,288,289,5,110,0,0,289,290,5,105,0,0,290,296,5,108, -0,0,291,292,5,110,0,0,292,293,5,117,0,0,293,294,5,108,0,0,294,296,5,108, -0,0,295,288,1,0,0,0,295,291,1,0,0,0,296,78,1,0,0,0,297,298,5,105,0,0,298, -299,5,102,0,0,299,80,1,0,0,0,300,301,5,101,0,0,301,302,5,108,0,0,302,303, -5,115,0,0,303,304,5,101,0,0,304,82,1,0,0,0,305,306,5,119,0,0,306,307,5,104, -0,0,307,308,5,105,0,0,308,309,5,108,0,0,309,332,5,101,0,0,310,311,5,102, -0,0,311,312,5,111,0,0,312,332,5,114,0,0,313,314,5,102,0,0,314,315,5,111, -0,0,315,316,5,114,0,0,316,317,5,101,0,0,317,318,5,97,0,0,318,319,5,99,0, -0,319,332,5,104,0,0,320,321,5,102,0,0,321,322,5,111,0,0,322,323,5,114,0, -0,323,324,5,69,0,0,324,325,5,97,0,0,325,326,5,99,0,0,326,332,5,104,0,0,327, -328,5,108,0,0,328,329,5,111,0,0,329,330,5,111,0,0,330,332,5,112,0,0,331, -305,1,0,0,0,331,310,1,0,0,0,331,313,1,0,0,0,331,320,1,0,0,0,331,327,1,0, -0,0,332,84,1,0,0,0,333,334,5,114,0,0,334,335,5,101,0,0,335,336,5,116,0,0, -336,337,5,117,0,0,337,338,5,114,0,0,338,339,5,110,0,0,339,86,1,0,0,0,340, -341,5,110,0,0,341,342,5,101,0,0,342,343,5,119,0,0,343,88,1,0,0,0,344,345, -5,112,0,0,345,346,5,97,0,0,346,347,5,114,0,0,347,90,1,0,0,0,348,349,5,103, -0,0,349,350,5,114,0,0,350,351,5,111,0,0,351,352,5,117,0,0,352,353,5,112, -0,0,353,92,1,0,0,0,354,355,5,111,0,0,355,356,5,112,0,0,356,357,5,116,0,0, -357,94,1,0,0,0,358,359,5,99,0,0,359,360,5,114,0,0,360,361,5,105,0,0,361, -362,5,116,0,0,362,363,5,105,0,0,363,364,5,99,0,0,364,365,5,97,0,0,365,366, -5,108,0,0,366,96,1,0,0,0,367,368,5,115,0,0,368,369,5,101,0,0,369,370,5,99, -0,0,370,371,5,116,0,0,371,372,5,105,0,0,372,373,5,111,0,0,373,380,5,110, -0,0,374,375,5,102,0,0,375,376,5,114,0,0,376,377,5,97,0,0,377,378,5,109,0, -0,378,380,5,101,0,0,379,367,1,0,0,0,379,374,1,0,0,0,380,98,1,0,0,0,381,382, -5,114,0,0,382,383,5,101,0,0,383,384,5,102,0,0,384,100,1,0,0,0,385,386,5, -97,0,0,386,387,5,115,0,0,387,102,1,0,0,0,388,389,5,116,0,0,389,390,5,114, -0,0,390,391,5,121,0,0,391,104,1,0,0,0,392,393,5,99,0,0,393,394,5,97,0,0, -394,395,5,116,0,0,395,396,5,99,0,0,396,397,5,104,0,0,397,106,1,0,0,0,398, -399,5,102,0,0,399,400,5,105,0,0,400,401,5,110,0,0,401,402,5,97,0,0,402,403, -5,108,0,0,403,404,5,108,0,0,404,405,5,121,0,0,405,108,1,0,0,0,406,407,5, -105,0,0,407,408,5,110,0,0,408,110,1,0,0,0,409,410,5,64,0,0,410,411,5,83, -0,0,411,412,5,116,0,0,412,413,5,97,0,0,413,414,5,114,0,0,414,415,5,116,0, -0,415,416,5,101,0,0,416,426,5,114,0,0,417,418,5,64,0,0,418,419,5,115,0,0, -419,420,5,116,0,0,420,421,5,97,0,0,421,422,5,114,0,0,422,423,5,116,0,0,423, -424,5,101,0,0,424,426,5,114,0,0,425,409,1,0,0,0,425,417,1,0,0,0,426,112, -1,0,0,0,427,428,5,64,0,0,428,429,5,82,0,0,429,430,5,101,0,0,430,431,5,116, -0,0,431,432,5,117,0,0,432,433,5,114,0,0,433,454,5,110,0,0,434,435,5,64,0, -0,435,436,5,114,0,0,436,437,5,101,0,0,437,438,5,116,0,0,438,439,5,117,0, -0,439,440,5,114,0,0,440,454,5,110,0,0,441,442,5,64,0,0,442,443,5,82,0,0, -443,444,5,101,0,0,444,445,5,112,0,0,445,446,5,108,0,0,446,454,5,121,0,0, -447,448,5,64,0,0,448,449,5,114,0,0,449,450,5,101,0,0,450,451,5,112,0,0,451, -452,5,108,0,0,452,454,5,121,0,0,453,427,1,0,0,0,453,434,1,0,0,0,453,441, -1,0,0,0,453,447,1,0,0,0,454,114,1,0,0,0,455,459,5,64,0,0,456,458,7,2,0,0, -457,456,1,0,0,0,458,461,1,0,0,0,459,457,1,0,0,0,459,460,1,0,0,0,460,116, -1,0,0,0,461,459,1,0,0,0,462,463,5,46,0,0,463,118,1,0,0,0,464,468,7,3,0,0, -465,467,7,4,0,0,466,465,1,0,0,0,467,470,1,0,0,0,468,466,1,0,0,0,468,469, -1,0,0,0,469,120,1,0,0,0,470,468,1,0,0,0,471,473,7,5,0,0,472,471,1,0,0,0, -473,474,1,0,0,0,474,472,1,0,0,0,474,475,1,0,0,0,475,122,1,0,0,0,476,477, -7,6,0,0,477,124,1,0,0,0,478,480,3,123,60,0,479,478,1,0,0,0,480,481,1,0,0, -0,481,479,1,0,0,0,481,482,1,0,0,0,482,126,1,0,0,0,483,485,3,123,60,0,484, -483,1,0,0,0,485,486,1,0,0,0,486,484,1,0,0,0,486,487,1,0,0,0,487,488,1,0, -0,0,488,492,5,46,0,0,489,491,3,123,60,0,490,489,1,0,0,0,491,494,1,0,0,0, -492,490,1,0,0,0,492,493,1,0,0,0,493,502,1,0,0,0,494,492,1,0,0,0,495,497, -5,46,0,0,496,498,3,123,60,0,497,496,1,0,0,0,498,499,1,0,0,0,499,497,1,0, -0,0,499,500,1,0,0,0,500,502,1,0,0,0,501,484,1,0,0,0,501,495,1,0,0,0,502, -128,1,0,0,0,503,506,5,36,0,0,504,507,3,125,61,0,505,507,3,127,62,0,506,504, -1,0,0,0,506,505,1,0,0,0,507,130,1,0,0,0,508,511,3,125,61,0,509,511,3,127, -62,0,510,508,1,0,0,0,510,509,1,0,0,0,511,512,1,0,0,0,512,513,3,121,59,0, -513,132,1,0,0,0,514,520,5,34,0,0,515,516,5,34,0,0,516,519,5,34,0,0,517,519, -8,7,0,0,518,515,1,0,0,0,518,517,1,0,0,0,519,522,1,0,0,0,520,518,1,0,0,0, -520,521,1,0,0,0,521,523,1,0,0,0,522,520,1,0,0,0,523,524,5,34,0,0,524,134, -1,0,0,0,525,531,5,34,0,0,526,527,5,34,0,0,527,530,5,34,0,0,528,530,8,7,0, -0,529,526,1,0,0,0,529,528,1,0,0,0,530,533,1,0,0,0,531,529,1,0,0,0,531,532, -1,0,0,0,532,136,1,0,0,0,533,531,1,0,0,0,534,535,7,8,0,0,535,536,1,0,0,0, -536,537,6,67,0,0,537,138,1,0,0,0,538,539,5,47,0,0,539,540,5,47,0,0,540,544, -1,0,0,0,541,543,8,8,0,0,542,541,1,0,0,0,543,546,1,0,0,0,544,542,1,0,0,0, -544,545,1,0,0,0,545,547,1,0,0,0,546,544,1,0,0,0,547,548,6,68,4,0,548,140, -1,0,0,0,549,550,9,0,0,0,550,142,1,0,0,0,551,555,4,70,0,0,552,554,3,3,0,0, -553,552,1,0,0,0,554,557,1,0,0,0,555,553,1,0,0,0,555,556,1,0,0,0,556,558, -1,0,0,0,557,555,1,0,0,0,558,559,5,61,0,0,559,560,5,61,0,0,560,564,1,0,0, -0,561,563,8,8,0,0,562,561,1,0,0,0,563,566,1,0,0,0,564,562,1,0,0,0,564,565, -1,0,0,0,565,144,1,0,0,0,566,564,1,0,0,0,567,569,8,8,0,0,568,567,1,0,0,0, -569,570,1,0,0,0,570,568,1,0,0,0,570,571,1,0,0,0,571,146,1,0,0,0,572,573, -7,8,0,0,573,574,1,0,0,0,574,575,6,72,5,0,575,148,1,0,0,0,576,578,8,8,0,0, -577,576,1,0,0,0,578,579,1,0,0,0,579,577,1,0,0,0,579,580,1,0,0,0,580,150, -1,0,0,0,581,582,7,8,0,0,582,583,1,0,0,0,583,584,6,74,5,0,584,152,1,0,0,0, -29,0,1,2,158,225,295,331,379,425,453,459,468,474,481,486,492,499,501,506, -510,518,520,529,531,544,555,564,570,579,6,0,1,0,0,3,0,5,2,0,5,1,0,0,2,0, -4,0,0]; +3169,3174,3183,3200,3200,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257, +3261,3261,3293,3294,3296,3297,3302,3311,3313,3314,3332,3340,3342,3344,3346, +3386,3389,3389,3406,3406,3412,3414,3423,3425,3430,3439,3450,3455,3461,3478, +3482,3505,3507,3515,3517,3517,3520,3526,3558,3567,3585,3632,3634,3635,3648, +3654,3664,3673,3713,3714,3716,3716,3718,3722,3724,3747,3749,3749,3751,3760, +3762,3763,3773,3773,3776,3780,3782,3782,3792,3801,3804,3807,3840,3840,3872, +3881,3904,3911,3913,3948,3976,3980,4096,4138,4159,4169,4176,4181,4186,4189, +4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4240,4249,4256,4293,4295, +4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701, +4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808, +4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5109,5112,5117,5121,5740, +5743,5759,5761,5786,5792,5866,5873,5880,5888,5905,5919,5937,5952,5969,5984, +5996,5998,6000,6016,6067,6103,6103,6108,6108,6112,6121,6160,6169,6176,6264, +6272,6276,6279,6312,6314,6314,6320,6389,6400,6430,6470,6509,6512,6516,6528, +6571,6576,6601,6608,6617,6656,6678,6688,6740,6784,6793,6800,6809,6823,6823, +6917,6963,6981,6988,6992,7001,7043,7072,7086,7141,7168,7203,7232,7241,7245, +7293,7296,7304,7312,7354,7357,7359,7401,7404,7406,7411,7413,7414,7418,7418, +7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027, +8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140, +8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336, +8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486, +8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8579,8580,11264, +11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568, +11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704, +11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293, +12294,12337,12341,12347,12348,12353,12438,12445,12447,12449,12538,12540, +12543,12549,12591,12593,12686,12704,12735,12784,12799,13312,19903,19968, +42124,42192,42237,42240,42508,42512,42539,42560,42606,42623,42653,42656, +42725,42775,42783,42786,42888,42891,42954,42960,42961,42963,42963,42965, +42969,42994,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138, +43187,43216,43225,43250,43255,43259,43259,43261,43262,43264,43301,43312, +43334,43360,43388,43396,43442,43471,43481,43488,43492,43494,43518,43520, +43560,43584,43586,43588,43595,43600,43609,43616,43638,43642,43642,43646, +43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739, +43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808, +43814,43816,43822,43824,43866,43868,43881,43888,44002,44016,44025,44032, +55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275, +64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320, +64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008, +65019,65136,65140,65142,65276,65296,65305,65313,65338,65345,65370,65382, +65470,65474,65479,65482,65487,65490,65495,65498,65500,65536,65547,65549, +65574,65576,65594,65596,65597,65599,65613,65616,65629,65664,65786,66176, +66204,66208,66256,66304,66335,66349,66368,66370,66377,66384,66421,66432, +66461,66464,66499,66504,66511,66560,66717,66720,66729,66736,66771,66776, +66811,66816,66855,66864,66915,66928,66938,66940,66954,66956,66962,66964, +66965,66967,66977,66979,66993,66995,67001,67003,67004,67072,67382,67392, +67413,67424,67431,67456,67461,67463,67504,67506,67514,67584,67589,67592, +67592,67594,67637,67639,67640,67644,67644,67647,67669,67680,67702,67712, +67742,67808,67826,67828,67829,67840,67861,67872,67897,67968,68023,68030, +68031,68096,68096,68112,68115,68117,68119,68121,68149,68192,68220,68224, +68252,68288,68295,68297,68324,68352,68405,68416,68437,68448,68466,68480, +68497,68608,68680,68736,68786,68800,68850,68864,68899,68912,68921,69248, +69289,69296,69297,69376,69404,69415,69415,69424,69445,69488,69505,69552, +69572,69600,69622,69635,69687,69734,69743,69745,69746,69749,69749,69763, +69807,69840,69864,69872,69881,69891,69926,69942,69951,69956,69956,69959, +69959,69968,70002,70006,70006,70019,70066,70081,70084,70096,70106,70108, +70108,70144,70161,70163,70187,70272,70278,70280,70280,70282,70285,70287, +70301,70303,70312,70320,70366,70384,70393,70405,70412,70415,70416,70419, +70440,70442,70448,70450,70451,70453,70457,70461,70461,70480,70480,70493, +70497,70656,70708,70727,70730,70736,70745,70751,70753,70784,70831,70852, +70853,70855,70855,70864,70873,71040,71086,71128,71131,71168,71215,71236, +71236,71248,71257,71296,71338,71352,71352,71360,71369,71424,71450,71472, +71481,71488,71494,71680,71723,71840,71913,71935,71942,71945,71945,71948, +71955,71957,71958,71960,71983,71999,71999,72001,72001,72016,72025,72096, +72103,72106,72144,72161,72161,72163,72163,72192,72192,72203,72242,72250, +72250,72272,72272,72284,72329,72349,72349,72368,72440,72704,72712,72714, +72750,72768,72768,72784,72793,72818,72847,72960,72966,72968,72969,72971, +73008,73030,73030,73040,73049,73056,73061,73063,73064,73066,73097,73112, +73112,73120,73129,73440,73458,73648,73648,73728,74649,74880,75075,77712, +77808,77824,78894,82944,83526,92160,92728,92736,92766,92768,92777,92784, +92862,92864,92873,92880,92909,92928,92975,92992,92995,93008,93017,93027, +93047,93053,93071,93760,93823,93952,94026,94032,94032,94099,94111,94176, +94177,94179,94179,94208,100343,100352,101589,101632,101640,110576,110579, +110581,110587,110589,110590,110592,110882,110928,110930,110948,110951,110960, +111355,113664,113770,113776,113788,113792,113800,113808,113817,119808,119892, +119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982, +119993,119995,119995,119997,120003,120005,120069,120071,120074,120077,120084, +120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138, +120144,120146,120485,120488,120512,120514,120538,120540,120570,120572,120596, +120598,120628,120630,120654,120656,120686,120688,120712,120714,120744,120746, +120770,120772,120779,120782,120831,122624,122654,123136,123180,123191,123197, +123200,123209,123214,123214,123536,123565,123584,123627,123632,123641,124896, +124902,124904,124907,124909,124910,124912,124926,124928,125124,125184,125251, +125259,125259,125264,125273,126464,126467,126469,126495,126497,126498,126500, +126500,126503,126503,126505,126514,126516,126519,126521,126521,126523,126523, +126530,126530,126535,126535,126537,126537,126539,126539,126541,126543,126545, +126546,126548,126548,126551,126551,126553,126553,126555,126555,126557,126557, +126559,126559,126561,126562,126564,126564,126567,126570,126572,126578,126580, +126583,126585,126588,126590,126590,126592,126601,126603,126619,126625,126627, +126629,126633,126635,126651,130032,130041,131072,173791,173824,177976,177984, +178205,178208,183969,183984,191456,194560,195101,196608,201546,2,0,65,90, +97,122,1,0,48,57,3,0,10,10,13,13,34,34,2,0,10,10,13,13,610,0,5,1,0,0,0,0, +7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0, +0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31, +1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0, +0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1, +0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0, +65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0, +0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87, +1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0, +0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109, +1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,0,119,1, +0,0,0,0,125,1,0,0,0,0,127,1,0,0,0,0,129,1,0,0,0,0,131,1,0,0,0,0,133,1,0, +0,0,0,135,1,0,0,0,0,137,1,0,0,0,0,139,1,0,0,0,0,141,1,0,0,0,0,143,1,0,0, +0,1,145,1,0,0,0,1,147,1,0,0,0,2,149,1,0,0,0,2,151,1,0,0,0,3,153,1,0,0,0, +5,156,1,0,0,0,7,162,1,0,0,0,9,170,1,0,0,0,11,181,1,0,0,0,13,190,1,0,0,0, +15,198,1,0,0,0,17,207,1,0,0,0,19,211,1,0,0,0,21,214,1,0,0,0,23,217,1,0,0, +0,25,220,1,0,0,0,27,222,1,0,0,0,29,228,1,0,0,0,31,231,1,0,0,0,33,234,1,0, +0,0,35,237,1,0,0,0,37,240,1,0,0,0,39,242,1,0,0,0,41,244,1,0,0,0,43,247,1, +0,0,0,45,250,1,0,0,0,47,252,1,0,0,0,49,254,1,0,0,0,51,256,1,0,0,0,53,258, +1,0,0,0,55,260,1,0,0,0,57,262,1,0,0,0,59,264,1,0,0,0,61,266,1,0,0,0,63,268, +1,0,0,0,65,270,1,0,0,0,67,272,1,0,0,0,69,274,1,0,0,0,71,276,1,0,0,0,73,278, +1,0,0,0,75,283,1,0,0,0,77,296,1,0,0,0,79,298,1,0,0,0,81,301,1,0,0,0,83,332, +1,0,0,0,85,334,1,0,0,0,87,341,1,0,0,0,89,345,1,0,0,0,91,349,1,0,0,0,93,355, +1,0,0,0,95,359,1,0,0,0,97,380,1,0,0,0,99,382,1,0,0,0,101,386,1,0,0,0,103, +389,1,0,0,0,105,393,1,0,0,0,107,399,1,0,0,0,109,407,1,0,0,0,111,426,1,0, +0,0,113,454,1,0,0,0,115,456,1,0,0,0,117,463,1,0,0,0,119,465,1,0,0,0,121, +473,1,0,0,0,123,477,1,0,0,0,125,480,1,0,0,0,127,502,1,0,0,0,129,504,1,0, +0,0,131,511,1,0,0,0,133,515,1,0,0,0,135,526,1,0,0,0,137,535,1,0,0,0,139, +539,1,0,0,0,141,550,1,0,0,0,143,552,1,0,0,0,145,569,1,0,0,0,147,573,1,0, +0,0,149,578,1,0,0,0,151,582,1,0,0,0,153,154,7,0,0,0,154,4,1,0,0,0,155,157, +3,3,0,0,156,155,1,0,0,0,157,158,1,0,0,0,158,156,1,0,0,0,158,159,1,0,0,0, +159,160,1,0,0,0,160,161,6,1,0,0,161,6,1,0,0,0,162,163,5,99,0,0,163,164,5, +111,0,0,164,165,5,110,0,0,165,166,5,115,0,0,166,167,5,116,0,0,167,168,1, +0,0,0,168,169,6,2,1,0,169,8,1,0,0,0,170,171,5,114,0,0,171,172,5,101,0,0, +172,173,5,97,0,0,173,174,5,100,0,0,174,175,5,111,0,0,175,176,5,110,0,0,176, +177,5,108,0,0,177,178,5,121,0,0,178,179,1,0,0,0,179,180,6,3,1,0,180,10,1, +0,0,0,181,182,5,115,0,0,182,183,5,116,0,0,183,184,5,97,0,0,184,185,5,116, +0,0,185,186,5,105,0,0,186,187,5,99,0,0,187,188,1,0,0,0,188,189,6,4,1,0,189, +12,1,0,0,0,190,191,5,97,0,0,191,192,5,119,0,0,192,193,5,97,0,0,193,194,5, +105,0,0,194,195,5,116,0,0,195,196,1,0,0,0,196,197,6,5,1,0,197,14,1,0,0,0, +198,199,4,6,0,0,199,200,5,116,0,0,200,201,5,105,0,0,201,202,5,116,0,0,202, +203,5,108,0,0,203,204,5,101,0,0,204,205,1,0,0,0,205,206,6,6,2,0,206,16,1, +0,0,0,207,208,5,58,0,0,208,209,1,0,0,0,209,210,6,7,3,0,210,18,1,0,0,0,211, +212,5,60,0,0,212,213,5,60,0,0,213,20,1,0,0,0,214,215,5,62,0,0,215,216,5, +62,0,0,216,22,1,0,0,0,217,218,5,45,0,0,218,219,5,62,0,0,219,24,1,0,0,0,220, +221,7,1,0,0,221,26,1,0,0,0,222,224,5,35,0,0,223,225,3,25,11,0,224,223,1, +0,0,0,225,226,1,0,0,0,226,224,1,0,0,0,226,227,1,0,0,0,227,28,1,0,0,0,228, +229,5,124,0,0,229,230,5,124,0,0,230,30,1,0,0,0,231,232,5,38,0,0,232,233, +5,38,0,0,233,32,1,0,0,0,234,235,5,61,0,0,235,236,5,61,0,0,236,34,1,0,0,0, +237,238,5,33,0,0,238,239,5,61,0,0,239,36,1,0,0,0,240,241,5,62,0,0,241,38, +1,0,0,0,242,243,5,60,0,0,243,40,1,0,0,0,244,245,5,62,0,0,245,246,5,61,0, +0,246,42,1,0,0,0,247,248,5,60,0,0,248,249,5,61,0,0,249,44,1,0,0,0,250,251, +5,43,0,0,251,46,1,0,0,0,252,253,5,45,0,0,253,48,1,0,0,0,254,255,5,42,0,0, +255,50,1,0,0,0,256,257,5,47,0,0,257,52,1,0,0,0,258,259,5,37,0,0,259,54,1, +0,0,0,260,261,5,94,0,0,261,56,1,0,0,0,262,263,5,33,0,0,263,58,1,0,0,0,264, +265,5,59,0,0,265,60,1,0,0,0,266,267,5,44,0,0,267,62,1,0,0,0,268,269,5,61, +0,0,269,64,1,0,0,0,270,271,5,40,0,0,271,66,1,0,0,0,272,273,5,41,0,0,273, +68,1,0,0,0,274,275,5,123,0,0,275,70,1,0,0,0,276,277,5,125,0,0,277,72,1,0, +0,0,278,279,5,116,0,0,279,280,5,114,0,0,280,281,5,117,0,0,281,282,5,101, +0,0,282,74,1,0,0,0,283,284,5,102,0,0,284,285,5,97,0,0,285,286,5,108,0,0, +286,287,5,115,0,0,287,288,5,101,0,0,288,76,1,0,0,0,289,290,5,110,0,0,290, +291,5,105,0,0,291,297,5,108,0,0,292,293,5,110,0,0,293,294,5,117,0,0,294, +295,5,108,0,0,295,297,5,108,0,0,296,289,1,0,0,0,296,292,1,0,0,0,297,78,1, +0,0,0,298,299,5,105,0,0,299,300,5,102,0,0,300,80,1,0,0,0,301,302,5,101,0, +0,302,303,5,108,0,0,303,304,5,115,0,0,304,305,5,101,0,0,305,82,1,0,0,0,306, +307,5,119,0,0,307,308,5,104,0,0,308,309,5,105,0,0,309,310,5,108,0,0,310, +333,5,101,0,0,311,312,5,102,0,0,312,313,5,111,0,0,313,333,5,114,0,0,314, +315,5,102,0,0,315,316,5,111,0,0,316,317,5,114,0,0,317,318,5,101,0,0,318, +319,5,97,0,0,319,320,5,99,0,0,320,333,5,104,0,0,321,322,5,102,0,0,322,323, +5,111,0,0,323,324,5,114,0,0,324,325,5,69,0,0,325,326,5,97,0,0,326,327,5, +99,0,0,327,333,5,104,0,0,328,329,5,108,0,0,329,330,5,111,0,0,330,331,5,111, +0,0,331,333,5,112,0,0,332,306,1,0,0,0,332,311,1,0,0,0,332,314,1,0,0,0,332, +321,1,0,0,0,332,328,1,0,0,0,333,84,1,0,0,0,334,335,5,114,0,0,335,336,5,101, +0,0,336,337,5,116,0,0,337,338,5,117,0,0,338,339,5,114,0,0,339,340,5,110, +0,0,340,86,1,0,0,0,341,342,5,110,0,0,342,343,5,101,0,0,343,344,5,119,0,0, +344,88,1,0,0,0,345,346,5,112,0,0,346,347,5,97,0,0,347,348,5,114,0,0,348, +90,1,0,0,0,349,350,5,103,0,0,350,351,5,114,0,0,351,352,5,111,0,0,352,353, +5,117,0,0,353,354,5,112,0,0,354,92,1,0,0,0,355,356,5,111,0,0,356,357,5,112, +0,0,357,358,5,116,0,0,358,94,1,0,0,0,359,360,5,99,0,0,360,361,5,114,0,0, +361,362,5,105,0,0,362,363,5,116,0,0,363,364,5,105,0,0,364,365,5,99,0,0,365, +366,5,97,0,0,366,367,5,108,0,0,367,96,1,0,0,0,368,369,5,115,0,0,369,370, +5,101,0,0,370,371,5,99,0,0,371,372,5,116,0,0,372,373,5,105,0,0,373,374,5, +111,0,0,374,381,5,110,0,0,375,376,5,102,0,0,376,377,5,114,0,0,377,378,5, +97,0,0,378,379,5,109,0,0,379,381,5,101,0,0,380,368,1,0,0,0,380,375,1,0,0, +0,381,98,1,0,0,0,382,383,5,114,0,0,383,384,5,101,0,0,384,385,5,102,0,0,385, +100,1,0,0,0,386,387,5,97,0,0,387,388,5,115,0,0,388,102,1,0,0,0,389,390,5, +116,0,0,390,391,5,114,0,0,391,392,5,121,0,0,392,104,1,0,0,0,393,394,5,99, +0,0,394,395,5,97,0,0,395,396,5,116,0,0,396,397,5,99,0,0,397,398,5,104,0, +0,398,106,1,0,0,0,399,400,5,102,0,0,400,401,5,105,0,0,401,402,5,110,0,0, +402,403,5,97,0,0,403,404,5,108,0,0,404,405,5,108,0,0,405,406,5,121,0,0,406, +108,1,0,0,0,407,408,5,105,0,0,408,409,5,110,0,0,409,110,1,0,0,0,410,411, +5,64,0,0,411,412,5,83,0,0,412,413,5,116,0,0,413,414,5,97,0,0,414,415,5,114, +0,0,415,416,5,116,0,0,416,417,5,101,0,0,417,427,5,114,0,0,418,419,5,64,0, +0,419,420,5,115,0,0,420,421,5,116,0,0,421,422,5,97,0,0,422,423,5,114,0,0, +423,424,5,116,0,0,424,425,5,101,0,0,425,427,5,114,0,0,426,410,1,0,0,0,426, +418,1,0,0,0,427,112,1,0,0,0,428,429,5,64,0,0,429,430,5,82,0,0,430,431,5, +101,0,0,431,432,5,116,0,0,432,433,5,117,0,0,433,434,5,114,0,0,434,455,5, +110,0,0,435,436,5,64,0,0,436,437,5,114,0,0,437,438,5,101,0,0,438,439,5,116, +0,0,439,440,5,117,0,0,440,441,5,114,0,0,441,455,5,110,0,0,442,443,5,64,0, +0,443,444,5,82,0,0,444,445,5,101,0,0,445,446,5,112,0,0,446,447,5,108,0,0, +447,455,5,121,0,0,448,449,5,64,0,0,449,450,5,114,0,0,450,451,5,101,0,0,451, +452,5,112,0,0,452,453,5,108,0,0,453,455,5,121,0,0,454,428,1,0,0,0,454,435, +1,0,0,0,454,442,1,0,0,0,454,448,1,0,0,0,455,114,1,0,0,0,456,460,5,64,0,0, +457,459,7,2,0,0,458,457,1,0,0,0,459,462,1,0,0,0,460,458,1,0,0,0,460,461, +1,0,0,0,461,116,1,0,0,0,462,460,1,0,0,0,463,464,5,46,0,0,464,118,1,0,0,0, +465,469,7,3,0,0,466,468,7,4,0,0,467,466,1,0,0,0,468,471,1,0,0,0,469,467, +1,0,0,0,469,470,1,0,0,0,470,120,1,0,0,0,471,469,1,0,0,0,472,474,7,5,0,0, +473,472,1,0,0,0,474,475,1,0,0,0,475,473,1,0,0,0,475,476,1,0,0,0,476,122, +1,0,0,0,477,478,7,6,0,0,478,124,1,0,0,0,479,481,3,123,60,0,480,479,1,0,0, +0,481,482,1,0,0,0,482,480,1,0,0,0,482,483,1,0,0,0,483,126,1,0,0,0,484,486, +3,123,60,0,485,484,1,0,0,0,486,487,1,0,0,0,487,485,1,0,0,0,487,488,1,0,0, +0,488,489,1,0,0,0,489,493,5,46,0,0,490,492,3,123,60,0,491,490,1,0,0,0,492, +495,1,0,0,0,493,491,1,0,0,0,493,494,1,0,0,0,494,503,1,0,0,0,495,493,1,0, +0,0,496,498,5,46,0,0,497,499,3,123,60,0,498,497,1,0,0,0,499,500,1,0,0,0, +500,498,1,0,0,0,500,501,1,0,0,0,501,503,1,0,0,0,502,485,1,0,0,0,502,496, +1,0,0,0,503,128,1,0,0,0,504,507,5,36,0,0,505,508,3,125,61,0,506,508,3,127, +62,0,507,505,1,0,0,0,507,506,1,0,0,0,508,130,1,0,0,0,509,512,3,125,61,0, +510,512,3,127,62,0,511,509,1,0,0,0,511,510,1,0,0,0,512,513,1,0,0,0,513,514, +3,121,59,0,514,132,1,0,0,0,515,521,5,34,0,0,516,517,5,34,0,0,517,520,5,34, +0,0,518,520,8,7,0,0,519,516,1,0,0,0,519,518,1,0,0,0,520,523,1,0,0,0,521, +519,1,0,0,0,521,522,1,0,0,0,522,524,1,0,0,0,523,521,1,0,0,0,524,525,5,34, +0,0,525,134,1,0,0,0,526,532,5,34,0,0,527,528,5,34,0,0,528,531,5,34,0,0,529, +531,8,7,0,0,530,527,1,0,0,0,530,529,1,0,0,0,531,534,1,0,0,0,532,530,1,0, +0,0,532,533,1,0,0,0,533,136,1,0,0,0,534,532,1,0,0,0,535,536,7,8,0,0,536, +537,1,0,0,0,537,538,6,67,0,0,538,138,1,0,0,0,539,540,5,47,0,0,540,541,5, +47,0,0,541,545,1,0,0,0,542,544,8,8,0,0,543,542,1,0,0,0,544,547,1,0,0,0,545, +543,1,0,0,0,545,546,1,0,0,0,546,548,1,0,0,0,547,545,1,0,0,0,548,549,6,68, +4,0,549,140,1,0,0,0,550,551,9,0,0,0,551,142,1,0,0,0,552,556,4,70,1,0,553, +555,3,3,0,0,554,553,1,0,0,0,555,558,1,0,0,0,556,554,1,0,0,0,556,557,1,0, +0,0,557,559,1,0,0,0,558,556,1,0,0,0,559,560,5,61,0,0,560,561,5,61,0,0,561, +565,1,0,0,0,562,564,8,8,0,0,563,562,1,0,0,0,564,567,1,0,0,0,565,563,1,0, +0,0,565,566,1,0,0,0,566,144,1,0,0,0,567,565,1,0,0,0,568,570,8,8,0,0,569, +568,1,0,0,0,570,571,1,0,0,0,571,569,1,0,0,0,571,572,1,0,0,0,572,146,1,0, +0,0,573,574,7,8,0,0,574,575,1,0,0,0,575,576,6,72,5,0,576,148,1,0,0,0,577, +579,8,8,0,0,578,577,1,0,0,0,579,580,1,0,0,0,580,578,1,0,0,0,580,581,1,0, +0,0,581,150,1,0,0,0,582,583,7,8,0,0,583,584,1,0,0,0,584,585,6,74,5,0,585, +152,1,0,0,0,29,0,1,2,158,226,296,332,380,426,454,460,469,475,482,487,493, +500,502,507,511,519,521,530,532,545,556,565,571,580,6,0,1,0,0,3,0,5,2,0, +5,1,0,0,2,0,4,0,0]; const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN); @@ -412,7 +412,7 @@ export default class sequenceLexer extends antlr4.Lexer { "MODIFIER_CHANNEL" ]; static modeNames = [ "DEFAULT_MODE", "EVENT", "TITLE_MODE" ]; static literalNames = [ null, null, "'const'", "'readonly'", "'static'", - "'await'", "'title'", "':'", "'<<'", "'>>'", "'->'", + "'await'", null, "':'", "'<<'", "'>>'", "'->'", null, "'||'", "'&&'", "'=='", "'!='", "'>'", "'<'", "'>='", "'<='", "'+'", "'-'", "'*'", "'/'", "'%'", "'^'", "'!'", "';'", "','", "'='", "'('", "')'", @@ -452,6 +452,29 @@ export default class sequenceLexer extends antlr4.Lexer { constructor(input) { super(input) this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache()); + + this.isTitle = function() { + // Check if 'title' appears at the beginning (only whitespace/comments before it) + const currentPos = this._tokenStartCharIndex; + const preceding = this._input.getText(0, currentPos - 1) + .replace(/\/\/[^\n]*(?:\n|$)/g, '') + .trim(); + if (preceding.length) return false; + + // Look ahead past 'title' and any whitespace to check what follows + const SPACE = 32, TAB = 9, EOF = -1, DOT = 46, EQUALS = 61, OPEN_PAREN = 40; + let pos = 6, next = this._input.LA(pos); + + // Skip past any whitespace + while (next === SPACE || next === TAB) { + ++pos; + next = this._input.LA(pos); + } + + // Title directive if EOF or not followed by '.', '(', '=' + return next === EOF || (next !== DOT && next !== EQUALS && next !== OPEN_PAREN); + }; + } get atn() { @@ -541,6 +564,8 @@ sequenceLexer.TITLE_MODE = 2; sequenceLexer.prototype.sempred = function(localctx, ruleIndex, predIndex) { switch (ruleIndex) { + case 6: + return this.TITLE_sempred(localctx, predIndex); case 70: return this.DIVIDER_sempred(localctx, predIndex); default: @@ -548,9 +573,18 @@ sequenceLexer.prototype.sempred = function(localctx, ruleIndex, predIndex) { } }; -sequenceLexer.prototype.DIVIDER_sempred = function(localctx, predIndex) { +sequenceLexer.prototype.TITLE_sempred = function(localctx, predIndex) { switch(predIndex) { case 0: + return this.isTitle(); + default: + throw "No predicate with index:" + predIndex; + } +}; + +sequenceLexer.prototype.DIVIDER_sempred = function(localctx, predIndex) { + switch(predIndex) { + case 1: return this.column === 0; default: throw "No predicate with index:" + predIndex; diff --git a/src/generated-parser/sequenceLexer.tokens b/src/generated-parser/sequenceLexer.tokens index 025d7d86..85a8490c 100644 --- a/src/generated-parser/sequenceLexer.tokens +++ b/src/generated-parser/sequenceLexer.tokens @@ -73,7 +73,6 @@ TITLE_END=71 'readonly'=3 'static'=4 'await'=5 -'title'=6 ':'=7 '<<'=8 '>>'=9 diff --git a/src/generated-parser/sequenceParser.js b/src/generated-parser/sequenceParser.js index 9522f761..393b8738 100644 --- a/src/generated-parser/sequenceParser.js +++ b/src/generated-parser/sequenceParser.js @@ -225,14 +225,14 @@ export default class sequenceParser extends antlr4.Parser { static grammarFileName = "java-escape"; static literalNames = [ null, null, "'const'", "'readonly'", "'static'", - "'await'", "'title'", "':'", "'<<'", "'>>'", - "'->'", null, "'||'", "'&&'", "'=='", "'!='", - "'>'", "'<'", "'>='", "'<='", "'+'", "'-'", - "'*'", "'/'", "'%'", "'^'", "'!'", "';'", "','", - "'='", "'('", "')'", "'{'", "'}'", "'true'", - "'false'", null, "'if'", "'else'", null, "'return'", - "'new'", "'par'", "'group'", "'opt'", "'critical'", - null, "'ref'", "'as'", "'try'", "'catch'", "'finally'", + "'await'", null, "':'", "'<<'", "'>>'", "'->'", + null, "'||'", "'&&'", "'=='", "'!='", "'>'", + "'<'", "'>='", "'<='", "'+'", "'-'", "'*'", + "'/'", "'%'", "'^'", "'!'", "';'", "','", "'='", + "'('", "')'", "'{'", "'}'", "'true'", "'false'", + null, "'if'", "'else'", null, "'return'", "'new'", + "'par'", "'group'", "'opt'", "'critical'", null, + "'ref'", "'as'", "'try'", "'catch'", "'finally'", "'in'", null, null, null, "'.'" ]; static symbolicNames = [ null, "WS", "CONSTANT", "READONLY", "STATIC", "AWAIT", "TITLE", "COL", "SOPEN", "SCLOSE", diff --git a/src/generated-parser/sequenceParser.tokens b/src/generated-parser/sequenceParser.tokens index 025d7d86..85a8490c 100644 --- a/src/generated-parser/sequenceParser.tokens +++ b/src/generated-parser/sequenceParser.tokens @@ -73,7 +73,6 @@ TITLE_END=71 'readonly'=3 'static'=4 'await'=5 -'title'=6 ':'=7 '<<'=8 '>>'=9 diff --git a/src/parser/Title/Title.spec.ts b/src/parser/Title/Title.spec.ts index 82975489..1b5abf7e 100644 --- a/src/parser/Title/Title.spec.ts +++ b/src/parser/Title/Title.spec.ts @@ -1,4 +1,4 @@ -import { TitleContextFixture } from "@/parser/ContextsFixture"; +import { TitleContextFixture, ProgContextFixture, SyncMessageContextFixture } from "@/parser/ContextsFixture"; describe("Title", function () { it("should parse the title", function () { @@ -9,4 +9,57 @@ describe("Title", function () { const title = TitleContextFixture("title"); expect(title.content()).toBe(""); }); + it("should parse title with leading spaces", function () { + const title = TitleContextFixture(" title My Title"); + expect(title.content()).toBe("My Title"); + }); +}); + +describe("Title as identifier", function () { + it("should allow 'title' as method name", function () { + const code = "A.title()"; + const message = SyncMessageContextFixture(code); + expect(message.messageBody().func().signature()[0].methodName().getText()).toBe("title"); + }); + + it("should allow 'title' as parameter name", function () { + const code = "A.method(title, value)"; + const message = SyncMessageContextFixture(code); + const params = message.messageBody().func().signature()[0].invocation().parameters().parameter(); + expect(params[0].getText()).toBe("title"); + }); + + it("should allow 'title' in named parameters", function () { + const code = 'A.method(title="My Title")'; + const message = SyncMessageContextFixture(code); + const params = message.messageBody().func().signature()[0].invocation().parameters().parameter(); + expect(params[0].namedParameter().ID().getText()).toBe("title"); + }); + + it("should allow 'title' as variable in assignment", function () { + const code = "title = A.getValue()"; + const message = SyncMessageContextFixture(code); + expect(message.messageBody().assignment().assignee().atom().getText()).toBe("title"); + }); + + it("should distinguish title directive from title method", function () { + const code = `title My Diagram +A.title()`; + const prog = ProgContextFixture(code); + expect(prog.title().content()).toBe("My Diagram"); + expect(prog.block().stat()[0].message().messageBody().func().signature()[0].methodName().getText()).toBe("title"); + }); + + it("should parse title after comments", function () { + const code = `// This is a comment +title My Title`; + const prog = ProgContextFixture(code); + expect(prog.title().content()).toBe("My Title"); + }); + + it("should allow title as participant in messages", function () { + const code = "A->title.method()"; + const message = SyncMessageContextFixture(code); + expect(message.messageBody().fromTo().to().getText()).toBe("title"); + }); });