*******************BEGINNING OF FUNCTION********************//
510346
public static boolean is_vargadi(String str)
    {
        String s1 = VarnaUtil.getAdiVarna(str);
        if (is_varga(s1)) return true;
        return false;
    }
991609
function PortugueseStemmer() {
    var base = new BaseStemmer();
    /** @const */
    var a_0 = [
      ["", -1, 3],
      ["\u00E3", 0, 1],
      ["\u00F5", 0, 2]
    ];

    /** @const */
    var a_1 = [
      ["", -1, 3],
      ["a~", 0, 1],
      ["o~", 0, 2]
    ];

    /** @const */
    var a_2 = [
      ["ic", -1, -1],
      ["ad", -1, -1],
      ["os", -1, -1],
      ["iv", -1, 1]
    ];

    /** @const */
    var a_3 = [
      ["ante", -1, 1],
      ["avel", -1, 1],
      ["\u00EDvel", -1, 1]
    ];

    /** @const */
    var a_4 = [
      ["ic", -1, 1],
      ["abil", -1, 1],
      ["iv", -1, 1]
    ];

    /** @const */
    var a_5 = [
      ["ica", -1, 1],
      ["\u00E2ncia", -1, 1],
      ["\u00EAncia", -1, 4],
      ["logia", -1, 2],
      ["ira", -1, 9],
      ["adora", -1, 1],
      ["osa", -1, 1],
      ["ista", -1, 1],
      ["iva", -1, 8],
      ["eza", -1, 1],
      ["idade", -1, 7],
      ["ante", -1, 1],
      ["mente", -1, 6],
      ["amente", 12, 5],
      ["\u00E1vel", -1, 1],
      ["\u00EDvel", -1, 1],
      ["ico", -1, 1],
      ["ismo", -1, 1],
      ["oso", -1, 1],
      ["amento", -1, 1],
      ["imento", -1, 1],
      ["ivo", -1, 8],
      ["a\u00E7a~o", -1, 1],
      ["u\u00E7a~o", -1, 3],
      ["ador", -1, 1],
      ["icas", -1, 1],
      ["\u00EAncias", -1, 4],
      ["logias", -1, 2],
      ["iras", -1, 9],
      ["adoras", -1, 1],
      ["osas", -1, 1],
      ["istas", -1, 1],
      ["ivas", -1, 8],
      ["ezas", -1, 1],
      ["idades", -1, 7],
      ["adores", -1, 1],
      ["antes", -1, 1],
      ["a\u00E7o~es", -1, 1],
      ["u\u00E7o~es", -1, 3],
      ["icos", -1, 1],
      ["ismos", -1, 1],
      ["osos", -1, 1],
      ["amentos", -1, 1],
      ["imentos", -1, 1],
      ["ivos", -1, 8]
    ];

    /** @const */
    var a_6 = [
      ["ada", -1, 1],
      ["ida", -1, 1],
      ["ia", -1, 1],
      ["aria", 2, 1],
      ["eria", 2, 1],
      ["iria", 2, 1],
      ["ara", -1, 1],
      ["era", -1, 1],
      ["ira", -1, 1],
      ["ava", -1, 1],
      ["asse", -1, 1],
      ["esse", -1, 1],
      ["isse", -1, 1],
      ["aste", -1, 1],
      ["este", -1, 1],
      ["iste", -1, 1],
      ["ei", -1, 1],
      ["arei", 16, 1],
      ["erei", 16, 1],
      ["irei", 16, 1],
      ["am", -1, 1],
      ["iam", 20, 1],
      ["ariam", 21, 1],
      ["eriam", 21, 1],
      ["iriam", 21, 1],
      ["aram", 20, 1],
      ["eram", 20, 1],
      ["iram", 20, 1],
      ["avam", 20, 1],
      ["em", -1, 1],
      ["arem", 29, 1],
      ["erem", 29, 1],
      ["irem", 29, 1],
      ["assem", 29, 1],
      ["essem", 29, 1],
      ["issem", 29, 1],
      ["ado", -1, 1],
      ["ido", -1, 1],
      ["ando", -1, 1],
      ["endo", -1, 1],
      ["indo", -1, 1],
      ["ara~o", -1, 1],
      ["era~o", -1, 1],
      ["ira~o", -1, 1],
      ["ar", -1, 1],
      ["er", -1, 1],
      ["ir", -1, 1],
      ["as", -1, 1],
      ["adas", 47, 1],
      ["idas", 47, 1],
      ["ias", 47, 1],
      ["arias", 50, 1],
      ["erias", 50, 1],
      ["irias", 50, 1],
      ["aras", 47, 1],
      ["eras", 47, 1],
      ["iras", 47, 1],
      ["avas", 47, 1],
      ["es", -1, 1],
      ["ardes", 58, 1],
      ["erdes", 58, 1],
      ["irdes", 58, 1],
      ["ares", 58, 1],
      ["eres", 58, 1],
      ["ires", 58, 1],
      ["asses", 58, 1],
      ["esses", 58, 1],
      ["isses", 58, 1],
      ["astes", 58, 1],
      ["estes", 58, 1],
      ["istes", 58, 1],
      ["is", -1, 1],
      ["ais", 71, 1],
      ["eis", 71, 1],
      ["areis", 73, 1],
      ["ereis", 73, 1],
      ["ireis", 73, 1],
      ["\u00E1reis", 73, 1],
      ["\u00E9reis", 73, 1],
      ["\u00EDreis", 73, 1],
      ["\u00E1sseis", 73, 1],
      ["\u00E9sseis", 73, 1],
      ["\u00EDsseis", 73, 1],
      ["\u00E1veis", 73, 1],
      ["\u00EDeis", 73, 1],
      ["ar\u00EDeis", 84, 1],
      ["er\u00EDeis", 84, 1],
      ["ir\u00EDeis", 84, 1],
      ["ados", -1, 1],
      ["idos", -1, 1],
      ["amos", -1, 1],
      ["\u00E1ramos", 90, 1],
      ["\u00E9ramos", 90, 1],
      ["\u00EDramos", 90, 1],
      ["\u00E1vamos", 90, 1],
      ["\u00EDamos", 90, 1],
      ["ar\u00EDamos", 95, 1],
      ["er\u00EDamos", 95, 1],
      ["ir\u00EDamos", 95, 1],
      ["emos", -1, 1],
      ["aremos", 99, 1],
      ["eremos", 99, 1],
      ["iremos", 99, 1],
      ["\u00E1ssemos", 99, 1],
      ["\u00EAssemos", 99, 1],
      ["\u00EDssemos", 99, 1],
      ["imos", -1, 1],
      ["armos", -1, 1],
      ["ermos", -1, 1],
      ["irmos", -1, 1],
      ["\u00E1mos", -1, 1],
      ["ar\u00E1s", -1, 1],
      ["er\u00E1s", -1, 1],
      ["ir\u00E1s", -1, 1],
      ["eu", -1, 1],
      ["iu", -1, 1],
      ["ou", -1, 1],
      ["ar\u00E1", -1, 1],
      ["er\u00E1", -1, 1],
      ["ir\u00E1", -1, 1]
    ];

    /** @const */
    var a_7 = [
      ["a", -1, 1],
      ["i", -1, 1],
      ["o", -1, 1],
      ["os", -1, 1],
      ["\u00E1", -1, 1],
      ["\u00ED", -1, 1],
      ["\u00F3", -1, 1]
    ];

    /** @const */
    var a_8 = [
      ["e", -1, 1],
      ["\u00E7", -1, 2],
      ["\u00E9", -1, 1],
      ["\u00EA", -1, 1]
    ];

    /** @const */
    var /** Array<int> */ g_v = [17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 19, 12, 2];

    var /** number */ I_p2 = 0;
    var /** number */ I_p1 = 0;
    var /** number */ I_pV = 0;


    /** @return {boolean} */
    function r_prelude() {
      var /** number */ among_var;
      // repeat, line 36
      replab0: while (true) {
        var /** number */ v_1 = base.cursor;
        lab1: {
          // (, line 36
          // [, line 37
          base.bra = base.cursor;
          // substring, line 37
          among_var = base.find_among(a_0);
          if (among_var == 0) {
            break lab1;
          }
          // ], line 37
          base.ket = base.cursor;
          switch (among_var) {
            case 0:
              break lab1;
            case 1:
              // (, line 38
              // <-, line 38
              if (!base.slice_from("a~")) {
                return false;
              }
              break;
            case 2:
              // (, line 39
              // <-, line 39
              if (!base.slice_from("o~")) {
                return false;
              }
              break;
            case 3:
              // (, line 40
              // next, line 40
              if (base.cursor >= base.limit) {
                break lab1;
              }
              base.cursor++;
              break;
          }
          continue replab0;
        }
        base.cursor = v_1;
        break replab0;
      }
      return true;
    };

    /** @return {boolean} */
    function r_mark_regions() {
      // (, line 44
      I_pV = base.limit;
      I_p1 = base.limit;
      I_p2 = base.limit;
      // do, line 50
      var /** number */ v_1 = base.cursor;
      lab0: {
        // (, line 50
        // or, line 52
        lab1: {
          var /** number */ v_2 = base.cursor;
          lab2: {
            // (, line 51
            if (!(base.in_grouping(g_v, 97, 250))) {
              break lab2;
            }
            // or, line 51
            lab3: {
              var /** number */ v_3 = base.cursor;
              lab4: {
                // (, line 51
                if (!(base.out_grouping(g_v, 97, 250))) {
                  break lab4;
                }
                // gopast, line 51
                golab5: while (true) {
                  lab6: {
                    if (!(base.in_grouping(g_v, 97, 250))) {
                      break lab6;
                    }
                    break golab5;
                  }
                  if (base.cursor >= base.limit) {
                    break lab4;
                  }
                  base.cursor++;
                }
                break lab3;
              }
              base.cursor = v_3;
              // (, line 51
              if (!(base.in_grouping(g_v, 97, 250))) {
                break lab2;
              }
              // gopast, line 51
              golab7: while (true) {
                lab8: {
                  if (!(base.out_grouping(g_v, 97, 250))) {
                    break lab8;
                  }
                  break golab7;
                }
                if (base.cursor >= base.limit) {
                  break lab2;
                }
                base.cursor++;
              }
            }
            break lab1;
          }
          base.cursor = v_2;
          // (, line 53
          if (!(base.out_grouping(g_v, 97, 250))) {
            break lab0;
          }
          // or, line 53
          lab9: {
            var /** number */ v_6 = base.cursor;
            lab10: {
              // (, line 53
              if (!(base.out_grouping(g_v, 97, 250))) {
                break lab10;
              }
              // gopast, line 53
              golab11: while (true) {
                lab12: {
                  if (!(base.in_grouping(g_v, 97, 250))) {
                    break lab12;
                  }
                  break golab11;
                }
                if (base.cursor >= base.limit) {
                  break lab10;
                }
                base.cursor++;
              }
              break lab9;
            }
            base.cursor = v_6;
            // (, line 53
            if (!(base.in_grouping(g_v, 97, 250))) {
              break lab0;
            }
            // next, line 53
            if (base.cursor >= base.limit) {
              break lab0;
            }
            base.cursor++;
          }
        }
        // setmark pV, line 54
        I_pV = base.cursor;
      }
      base.cursor = v_1;
      // do, line 56
      var /** number */ v_8 = base.cursor;
      lab13: {
        // (, line 56
        // gopast, line 57
        golab14: while (true) {
          lab15: {
            if (!(base.in_grouping(g_v, 97, 250))) {
              break lab15;
            }
            break golab14;
          }
          if (base.cursor >= base.limit) {
            break lab13;
          }
          base.cursor++;
        }
        // gopast, line 57
        golab16: while (true) {
          lab17: {
            if (!(base.out_grouping(g_v, 97, 250))) {
              break lab17;
            }
            break golab16;
          }
          if (base.cursor >= base.limit) {
            break lab13;
          }
          base.cursor++;
        }
        // setmark p1, line 57
        I_p1 = base.cursor;
        // gopast, line 58
        golab18: while (true) {
          lab19: {
            if (!(base.in_grouping(g_v, 97, 250))) {
              break lab19;
            }
            break golab18;
          }
          if (base.cursor >= base.limit) {
            break lab13;
          }
          base.cursor++;
        }
        // gopast, line 58
        golab20: while (true) {
          lab21: {
            if (!(base.out_grouping(g_v, 97, 250))) {
              break lab21;
            }
            break golab20;
          }
          if (base.cursor >= base.limit) {
            break lab13;
          }
          base.cursor++;
        }
        // setmark p2, line 58
        I_p2 = base.cursor;
      }
      base.cursor = v_8;
      return true;
    };

    /** @return {boolean} */
    function r_postlude() {
      var /** number */ among_var;
      // repeat, line 62
      replab0: while (true) {
        var /** number */ v_1 = base.cursor;
        lab1: {
          // (, line 62
          // [, line 63
          base.bra = base.cursor;
          // substring, line 63
          among_var = base.find_among(a_1);
          if (among_var == 0) {
            break lab1;
          }
          // ], line 63
          base.ket = base.cursor;
          switch (among_var) {
            case 0:
              break lab1;
            case 1:
              // (, line 64
              // <-, line 64
              if (!base.slice_from("\u00E3")) {
                return false;
              }
              break;
            case 2:
              // (, line 65
              // <-, line 65
              if (!base.slice_from("\u00F5")) {
                return false;
              }
              break;
            case 3:
              // (, line 66
              // next, line 66
              if (base.cursor >= base.limit) {
                break lab1;
              }
              base.cursor++;
              break;
          }
          continue replab0;
        }
        base.cursor = v_1;
        break replab0;
      }
      return true;
    };

    /** @return {boolean} */
    function r_RV() {
      if (!(I_pV <= base.cursor)) {
        return false;
      }
      return true;
    };

    /** @return {boolean} */
    function r_R1() {
      if (!(I_p1 <= base.cursor)) {
        return false;
      }
      return true;
    };

    /** @return {boolean} */
    function r_R2() {
      if (!(I_p2 <= base.cursor)) {
        return false;
      }
      return true;
    };

    /** @return {boolean} */
    function r_standard_suffix() {
      var /** number */ among_var;
      // (, line 76
      // [, line 77
      base.ket = base.cursor;
      // substring, line 77
      among_var = base.find_among_b(a_5);
      if (among_var == 0) {
        return false;
      }
      // ], line 77
      base.bra = base.cursor;
      switch (among_var) {
        case 0:
          return false;
        case 1:
          // (, line 92
          // call R2, line 93
          if (!r_R2()) {
            return false;
          }
          // delete, line 93
          if (!base.slice_del()) {
            return false;
          }
          break;
        case 2:
          // (, line 97
          // call R2, line 98
          if (!r_R2()) {
            return false;
          }
          // <-, line 98
          if (!base.slice_from("log")) {
            return false;
          }
          break;
        case 3:
          // (, line 101
          // call R2, line 102
          if (!r_R2()) {
            return false;
          }
          // <-, line 102
          if (!base.slice_from("u")) {
            return false;
          }
          break;
        case 4:
          // (, line 105
          // call R2, line 106
          if (!r_R2()) {
            return false;
          }
          // <-, line 106
          if (!base.slice_from("ente")) {
            return false;
          }
          break;
        case 5:
          // (, line 109
          // call R1, line 110
          if (!r_R1()) {
            return false;
          }
          // delete, line 110
          if (!base.slice_del()) {
            return false;
          }
          // try, line 111
          var /** number */ v_1 = base.limit - base.cursor;
          lab0: {
            // (, line 111
            // [, line 112
            base.ket = base.cursor;
            // substring, line 112
            among_var = base.find_among_b(a_2);
            if (among_var == 0) {
              base.cursor = base.limit - v_1;
              break lab0;
            }
            // ], line 112
            base.bra = base.cursor;
            // call R2, line 112
            if (!r_R2()) {
              base.cursor = base.limit - v_1;
              break lab0;
            }
            // delete, line 112
            if (!base.slice_del()) {
              return false;
            }
            switch (among_var) {
              case 0:
                base.cursor = base.limit - v_1;
                break lab0;
              case 1:
                // (, line 113
                // [, line 113
                base.ket = base.cursor;
                // literal, line 113
                if (!(base.eq_s_b("at"))) {
                  base.cursor = base.limit - v_1;
                  break lab0;
                }
                // ], line 113
                base.bra = base.cursor;
                // call R2, line 113
                if (!r_R2()) {
                  base.cursor = base.limit - v_1;
                  break lab0;
                }
                // delete, line 113
                if (!base.slice_del()) {
                  return false;
                }
                break;
            }
          }
          break;
        case 6:
          // (, line 121
          // call R2, line 122
          if (!r_R2()) {
            return false;
          }
          // delete, line 122
          if (!base.slice_del()) {
            return false;
          }
          // try, line 123
          var /** number */ v_2 = base.limit - base.cursor;
          lab1: {
            // (, line 123
            // [, line 124
            base.ket = base.cursor;
            // substring, line 124
            among_var = base.find_among_b(a_3);
            if (among_var == 0) {
              base.cursor = base.limit - v_2;
              break lab1;
            }
            // ], line 124
            base.bra = base.cursor;
            switch (among_var) {
              case 0:
                base.cursor = base.limit - v_2;
                break lab1;
              case 1:
                // (, line 127
                // call R2, line 127
                if (!r_R2()) {
                  base.cursor = base.limit - v_2;
                  break lab1;
                }
                // delete, line 127
                if (!base.slice_del()) {
                  return false;
                }
                break;
            }
          }
          break;
        case 7:
          // (, line 133
          // call R2, line 134
          if (!r_R2()) {
            return false;
          }
          // delete, line 134
          if (!base.slice_del()) {
            return false;
          }
          // try, line 135
          var /** number */ v_3 = base.limit - base.cursor;
          lab2: {
            // (, line 135
            // [, line 136
            base.ket = base.cursor;
            // substring, line 136
            among_var = base.find_among_b(a_4);
            if (among_var == 0) {
              base.cursor = base.limit - v_3;
              break lab2;
            }
            // ], line 136
            base.bra = base.cursor;
            switch (among_var) {
              case 0:
                base.cursor = base.limit - v_3;
                break lab2;
              case 1:
                // (, line 139
                // call R2, line 139
                if (!r_R2()) {
                  base.cursor = base.limit - v_3;
                  break lab2;
                }
                // delete, line 139
                if (!base.slice_del()) {
                  return false;
                }
                break;
            }
          }
          break;
        case 8:
          // (, line 145
          // call R2, line 146
          if (!r_R2()) {
            return false;
          }
          // delete, line 146
          if (!base.slice_del()) {
            return false;
          }
          // try, line 147
          var /** number */ v_4 = base.limit - base.cursor;
          lab3: {
            // (, line 147
            // [, line 148
            base.ket = base.cursor;
            // literal, line 148
            if (!(base.eq_s_b("at"))) {
              base.cursor = base.limit - v_4;
              break lab3;
            }
            // ], line 148
            base.bra = base.cursor;
            // call R2, line 148
            if (!r_R2()) {
              base.cursor = base.limit - v_4;
              break lab3;
            }
            // delete, line 148
            if (!base.slice_del()) {
              return false;
            }
          }
          break;
        case 9:
          // (, line 152
          // call RV, line 153
          if (!r_RV()) {
            return false;
          }
          // literal, line 153
          if (!(base.eq_s_b("e"))) {
            return false;
          }
          // <-, line 154
          if (!base.slice_from("ir")) {
            return false;
          }
          break;
      }
      return true;
    };

    /** @return {boolean} */
    function r_verb_suffix() {
      var /** number */ among_var;
      // setlimit, line 159
      var /** number */ v_1 = base.limit - base.cursor;
      // tomark, line 159
      if (base.cursor < I_pV) {
        return false;
      }
      base.cursor = I_pV;
      var /** number */ v_2 = base.limit_backward;
      base.limit_backward = base.cursor;
      base.cursor = base.limit - v_1;
      // (, line 159
      // [, line 160
      base.ket = base.cursor;
      // substring, line 160
      among_var = base.find_among_b(a_6);
      if (among_var == 0) {
        base.limit_backward = v_2;
        return false;
      }
      // ], line 160
      base.bra = base.cursor;
      switch (among_var) {
        case 0:
          base.limit_backward = v_2;
          return false;
        case 1:
          // (, line 179
          // delete, line 179
          if (!base.slice_del()) {
            return false;
          }
          break;
      }
      base.limit_backward = v_2;
      return true;
    };

    /** @return {boolean} */
    function r_residual_suffix() {
      var /** number */ among_var;
      // (, line 183
      // [, line 184
      base.ket = base.cursor;
      // substring, line 184
      among_var = base.find_among_b(a_7);
      if (among_var == 0) {
        return false;
      }
      // ], line 184
      base.bra = base.cursor;
      switch (among_var) {
        case 0:
          return false;
        case 1:
          // (, line 187
          // call RV, line 187
          if (!r_RV()) {
            return false;
          }
          // delete, line 187
          if (!base.slice_del()) {
            return false;
          }
          break;
      }
      return true;
    };

    /** @return {boolean} */
    function r_residual_form() {
      var /** number */ among_var;
      // (, line 191
      // [, line 192
      base.ket = base.cursor;
      // substring, line 192
      among_var = base.find_among_b(a_8);
      if (among_var == 0) {
        return false;
      }
      // ], line 192
      base.bra = base.cursor;
      switch (among_var) {
        case 0:
          return false;
        case 1:
          // (, line 194
          // call RV, line 194
          if (!r_RV()) {
            return false;
          }
          // delete, line 194
          if (!base.slice_del()) {
            return false;
          }
          // [, line 194
          base.ket = base.cursor;
          // or, line 194
          lab0: {
            var /** number */ v_1 = base.limit - base.cursor;
            lab1: {
              // (, line 194
              // literal, line 194
              if (!(base.eq_s_b("u"))) {
                break lab1;
              }
              // ], line 194
              base.bra = base.cursor;
              // test, line 194
              var /** number */ v_2 = base.limit - base.cursor;
              // literal, line 194
              if (!(base.eq_s_b("g"))) {
                break lab1;
              }
              base.cursor = base.limit - v_2;
              break lab0;
            }
            base.cursor = base.limit - v_1;
            // (, line 195
            // literal, line 195
            if (!(base.eq_s_b("i"))) {
              return false;
            }
            // ], line 195
            base.bra = base.cursor;
            // test, line 195
            var /** number */ v_3 = base.limit - base.cursor;
            // literal, line 195
            if (!(base.eq_s_b("c"))) {
              return false;
            }
            base.cursor = base.limit - v_3;
          }
          // call RV, line 195
          if (!r_RV()) {
            return false;
          }
          // delete, line 195
          if (!base.slice_del()) {
            return false;
          }
          break;
        case 2:
          // (, line 196
          // <-, line 196
          if (!base.slice_from("c")) {
            return false;
          }
          break;
      }
      return true;
    };

    this.stem = /** @return {boolean} */ function() {
      // (, line 201
      // do, line 202
      var /** number */ v_1 = base.cursor;
      lab0: {
        // call prelude, line 202
        if (!r_prelude()) {
          break lab0;
        }
      }
      base.cursor = v_1;
      // do, line 203
      var /** number */ v_2 = base.cursor;
      lab1: {
        // call mark_regions, line 203
        if (!r_mark_regions()) {
          break lab1;
        }
      }
      base.cursor = v_2;
      // backwards, line 204
      base.limit_backward = base.cursor;
      base.cursor = base.limit;
      // (, line 204
      // do, line 205
      var /** number */ v_3 = base.limit - base.cursor;
      lab2: {
        // (, line 205
        // or, line 209
        lab3: {
          var /** number */ v_4 = base.limit - base.cursor;
          lab4: {
            // (, line 206
            // and, line 207
            var /** number */ v_5 = base.limit - base.cursor;
            // (, line 206
            // or, line 206
            lab5: {
              var /** number */ v_6 = base.limit - base.cursor;
              lab6: {
                // call standard_suffix, line 206
                if (!r_standard_suffix()) {
                  break lab6;
                }
                break lab5;
              }
              base.cursor = base.limit - v_6;
              // call verb_suffix, line 206
              if (!r_verb_suffix()) {
                break lab4;
              }
            }
            base.cursor = base.limit - v_5;
            // do, line 207
            var /** number */ v_7 = base.limit - base.cursor;
            lab7: {
              // (, line 207
              // [, line 207
              base.ket = base.cursor;
              // literal, line 207
              if (!(base.eq_s_b("i"))) {
                break lab7;
              }
              // ], line 207
              base.bra = base.cursor;
              // test, line 207
              var /** number */ v_8 = base.limit - base.cursor;
              // literal, line 207
              if (!(base.eq_s_b("c"))) {
                break lab7;
              }
              base.cursor = base.limit - v_8;
              // call RV, line 207
              if (!r_RV()) {
                break lab7;
              }
              // delete, line 207
              if (!base.slice_del()) {
                return false;
              }
            }
            base.cursor = base.limit - v_7;
            break lab3;
          }
          base.cursor = base.limit - v_4;
          // call residual_suffix, line 209
          if (!r_residual_suffix()) {
            break lab2;
          }
        }
      }
      base.cursor = base.limit - v_3;
      // do, line 211
      var /** number */ v_9 = base.limit - base.cursor;
      lab8: {
        // call residual_form, line 211
        if (!r_residual_form()) {
          break lab8;
        }
      }
      base.cursor = base.limit - v_9;
      base.cursor = base.limit_backward; // do, line 213
      var /** number */ v_10 = base.cursor;
      lab9: {
        // call postlude, line 213
        if (!r_postlude()) {
          break lab9;
        }
      }
      base.cursor = v_10;
      return true;
    };

    /**@return{string}*/
    this['stemWord'] = function( /**string*/ word) {
      base.setCurrent(word);
      this.stem();
      return base.getCurrent();
    };
  }
575141
function init() {
    if (tokens) {
      return;
    }
    if (fromString) {
      tokens = cbml.parse(contentString);
    }
    else {
      tokens = cbml.parse(fs.readFileSync(filename));
    }
    /*<debug>
    console.log(JSON.stringify(tokens, null, '  '));
    //</debug>*/
  }
343169
public boolean startsWith(final String str) {
        if (str == null) {
            return false;
        }
        final int len = str.length();
        if (len == 0) {
            return true;
        }
        if (len > size) {
            return false;
        }
        for (int i = 0; i < len; i++) {
            if (buffer[i] != str.charAt(i)) {
                return false;
            }
        }
        return true;
    }
542079
function() {
    var parens = 1
      , i = 2
      , tok;

    // Lookahead and determine if we are dealing
    // with a function call or definition. Here
    // we pair parens to prevent false negatives
    out:
    while (tok = this.lookahead(i++)) {
      switch (tok.type) {
        case 'function':
        case '(':
          ++parens;
          break;
        case ')':
          if (!--parens) break out;
          break;
        case 'eos':
          this.error('failed to find closing paren ")"');
      }
    }

    // Definition or call
    switch (this.currentState()) {
      case 'expression':
        return this.functionCall();
      default:
        return this.looksLikeFunctionDefinition(i)
          ? this.functionDefinition()
          : this.expression();
    }
  }
31997
function getStart (str) {
  var ret = null
  var match = /[0-9]+,[0-9]+,.*/.test(str)
  if (!match) {
    return null
  }
  var a = str.split(',')
  if (a && a[0]) {
    var end = a[0]
    ret = parseInt(end)
    return ret
  } else {
    return null
  }
  if (isNaN(ret)) {
    return null
  }
  return ret
}
118071
function(start, end, line, offset, len) {
			// We use typeof because we need to distinguish the number 0 from an undefined or null parameter
			if (typeof(start) === "number") { //$NON-NLS-0$
				if (typeof(end) !== "number") { //$NON-NLS-0$
					end = start;
				}
				this.moveSelection(start, end);
				return true;
			} else if (typeof(line) === "number") { //$NON-NLS-0$
				var model = this.getModel();
				var pos = model.getLineStart(line-1);
				if (typeof(offset) === "number") { //$NON-NLS-0$
					pos = pos + offset;
				}
				if (typeof(len) !== "number") { //$NON-NLS-0$
					len = 0;
				}
				this.moveSelection(pos, pos+len);
				return true;
			}
			return false;
		}
648964
function main() {
	// TODO: move loading of inputs into main function
	check(lookupQType(typeDecl.global,[]), {key: snapshot.global}, '', false, null, '<global>');
	if (program.missing) {
		findSuggestions()
	}
	if (program.coverage) {
		printCoverage();
	}
	if (program.stats) {
		console.log("# heap objects = " + snapshot.heap.length)
		console.log("# call signatures = " + num_callsigs_analyzed)
	}
}
537425
function stringStartsWith (str, val, startIndex) {
  var rest = '' + str
  return (arguments.length === 1 ? rest : rest.substring(startIndex)).indexOf(val) === 0
}
265353
static function p($n) {
		$r = null;  /** @var string|null $r */
		$types = [
			self::AE => function($n) {return !!preg_match("/^3$|^3[47][0-9]{0,13}$/i", $n);}
			,self::DN => function($n) {return !!preg_match("/^3(?:0[0-5]|[68][0-9])[0-9]{4,}$/i", $n);}
			,self::DS => function($n) {return !!preg_match(
				"/^6$|^6[05]$|^601[1]?$|^65[0-9][0-9]?$|^6(?:011|5[0-9]{2})[0-9]{0,12}$/i", $n
			);}
			,self::JC => function($n) {return !!preg_match("/^(?:2131|1800|35[0-9]{3})[0-9]{3,}$/i", $n);}
			,self::MC => function($n) {return !!preg_match(
				"/^5[1-5][0-9]{5,}|222[1-9][0-9]{3,}|22[3-9][0-9]{4,}|2[3-6][0-9]{5,}|27[01][0-9]{4,}|2720[0-9]{3,}$/i", $n
			);}
			,self::VI => function($n) {return !!preg_match("/^4[0-9]{0,15}$/i", $n);}
		];
		foreach ($types as $t => $f) { /** @var string $t */
			if ($f($n)) {
				$r = $t;
				break;
			}
		}
		return $r;
	}
1173519
function FFT() {
  
  var _n = 0,          // order
      _bitrev = null,  // bit reversal table
      _cstb = null;    // sin/cos table
  var _tre, _tim;
  
  this.init = function (n) {
    if(n !== 0 && (n & (n - 1)) === 0) {
      _n = n;
      _setVariables();
      _makeBitReversal();
      _makeCosSinTable();
    } else {
      throw new Error("init: radix-2 required");
    }
  };
    
  // 1D-FFT
  this.fft1d = function (re, im) {
    fft(re, im, 1);
  };
    
  // 1D-IFFT
  this.ifft1d = function (re, im) {
    var n = 1/_n;
    fft(re, im, -1);
    for(var i=0; i<_n; i++) {
      re[i] *= n;
      im[i] *= n;
    }
  };
  
  // 2D-FFT
  this.fft2d = function (re, im) {
    var i = 0;
    // x-axis
    for(var y=0; y<_n; y++) {
      i = y*_n;
      for(var x1=0; x1<_n; x1++) {
        _tre[x1] = re[x1 + i];
        _tim[x1] = im[x1 + i];
      }
      this.fft1d(_tre, _tim);
      for(var x2=0; x2<_n; x2++) {
        re[x2 + i] = _tre[x2];
        im[x2 + i] = _tim[x2];
      }
    }
    // y-axis
    for(var x=0; x<_n; x++) {
      for(var y1=0; y1<_n; y1++) {
        i = x + y1*_n;
        _tre[y1] = re[i];
        _tim[y1] = im[i];
      }
      this.fft1d(_tre, _tim);
      for(var y2=0; y2<_n; y2++) {
        i = x + y2*_n;
        re[i] = _tre[y2];
        im[i] = _tim[y2];
      }
    }
  };
  
  // 2D-IFFT
  this.ifft2d = function (re, im) {
    var i = 0;
    // x-axis
    for(var y=0; y<_n; y++) {
      i = y*_n;
      for(var x1=0; x1<_n; x1++) {
        _tre[x1] = re[x1 + i];
        _tim[x1] = im[x1 + i];
      }
      this.ifft1d(_tre, _tim);
      for(var x2=0; x2<_n; x2++) {
        re[x2 + i] = _tre[x2];
        im[x2 + i] = _tim[x2];
      }
    }
    // y-axis
    for(var x=0; x<_n; x++) {
      for(var y1=0; y1<_n; y1++) {
        i = x + y1*_n;
        _tre[y1] = re[i];
        _tim[y1] = im[i];
      }
      this.ifft1d(_tre, _tim);
      for(var y2=0; y2<_n; y2++) {
        i = x + y2*_n;
        re[i] = _tre[y2];
        im[i] = _tim[y2];
      }
    }
  };
  
  // core operation of FFT
  function fft(re, im, inv) {
    var d, h, ik, m, tmp, wr, wi, xr, xi,
        n4 = _n >> 2;
    // bit reversal
    for(var l=0; l<_n; l++) {
      m = _bitrev[l];
      if(l < m) {
        tmp = re[l];
        re[l] = re[m];
        re[m] = tmp;
        tmp = im[l];
        im[l] = im[m];
        im[m] = tmp;
      }
    }
    // butterfly operation
    for(var k=1; k<_n; k<<=1) {
      h = 0;
      d = _n/(k << 1);
      for(var j=0; j<k; j++) {
        wr = _cstb[h + n4];
        wi = inv*_cstb[h];
        for(var i=j; i<_n; i+=(k<<1)) {
          ik = i + k;
          xr = wr*re[ik] + wi*im[ik];
          xi = wr*im[ik] - wi*re[ik];
          re[ik] = re[i] - xr;
          re[i] += xr;
          im[ik] = im[i] - xi;
          im[i] += xi;
        }
        h += d;
      }
    }
  }
  
  // set variables
  function _setVariables() {
    if(typeof Uint8Array !== 'undefined') {
      _bitrev = new Uint8Array(_n);
    } else {
      _bitrev = new Array(_n);
    }
    if(typeof Float64Array !== 'undefined') {
      _cstb = new Float64Array(_n*1.25);
      _tre = new Float64Array(_n*_n);
      _tim = new Float64Array(_n*_n);
    } else {
      _cstb = new Array(_n*1.25);
      _tre = new Array(_n*_n);
      _tim = new Array(_n*_n);
    }
  }
  
  // make bit reversal table
  function _makeBitReversal() {
    var i = 0,
        j = 0,
        k = 0;
    _bitrev[0] = 0;
    while(++i < _n) {
      k = _n >> 1;
      while(k <= j) {
        j -= k;
        k >>= 1;
      }
      j += k;
      _bitrev[i] = j;
    }
  }
  
  // make trigonometric function table
  function _makeCosSinTable() {
    var n2 = _n >> 1,
        n4 = _n >> 2,
        n8 = _n >> 3,
        n2p4 = n2 + n4,
        t = Math.sin(Math.PI/_n),
        dc = 2*t*t,
        ds = Math.sqrt(dc*(2 - dc)),
        c = _cstb[n4] = 1,
        s = _cstb[0] = 0;
    t = 2*dc;
    for(var i=1; i<n8; i++) {
      c -= dc;
      dc += t*c;
      s += ds;
      ds -= t*s;
      _cstb[i] = s;
      _cstb[n4 - i] = c;
    }
    if(n8 !== 0) {
      _cstb[n8] = Math.sqrt(0.5);
    }
    for(var j=0; j<n4; j++) {
      _cstb[n2 - j]  = _cstb[j];
    }
    for(var k=0; k<n2p4; k++) {
      _cstb[k + n2] = -_cstb[k];
    }
  }
}
1053644
function g(){Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)});var d={MAX_CODEPOINT:1114111,encodeUTF8:function(a,b){var c=null;"number"===typeof a&&(c=a,a=function(){return null});for(;null!==c||null!==(c=a());)128>c?b(c&127):(2048>c?b(c>>6&31|192):(65536>c?b(c>>12&15|224):(b(c>>18&7|240),b(c>>12&63|128)),b(c>>6&63|128)),b(c&63|128)),c=null},decodeUTF8:function(a,b){function c(a){a=a.slice(0,a.indexOf(null));var b=Error(a.toString());b.name="TruncatedError";
b.bytes=a;throw b;}for(var e,d,f,h;null!==(e=a());)if(0===(e&128))b(e);else if(192===(e&224))null===(d=a())&&c([e,d]),b((e&31)<<6|d&63);else if(224===(e&240))null!==(d=a())&&null!==(f=a())||c([e,d,f]),b((e&15)<<12|(d&63)<<6|f&63);else if(240===(e&248))null!==(d=a())&&null!==(f=a())&&null!==(h=a())||c([e,d,f,h]),b((e&7)<<18|(d&63)<<12|(f&63)<<6|h&63);else throw RangeError("Illegal starting byte: "+e);},UTF16toUTF8:function(a,b){for(var c,e=null;null!==(c=null!==e?e:a());)55296<=c&&57343>=c&&null!==
(e=a())&&56320<=e&&57343>=e?(b(1024*(c-55296)+e-56320+65536),e=null):b(c);null!==e&&b(e)},UTF8toUTF16:function(a,b){var c=null;"number"===typeof a&&(c=a,a=function(){return null});for(;null!==c||null!==(c=a());)65535>=c?b(c):(c-=65536,b((c>>10)+55296),b(c%1024+56320)),c=null},encodeUTF16toUTF8:function(a,b){d.UTF16toUTF8(a,function(a){d.encodeUTF8(a,b)})},decodeUTF8toUTF16:function(a,b){d.decodeUTF8(a,function(a){d.UTF8toUTF16(a,b)})},calculateCodePoint:function(a){return 128>a?1:2048>a?2:65536>a?
3:4},calculateUTF8:function(a){for(var b,c=0;null!==(b=a());)c+=128>b?1:2048>b?2:65536>b?3:4;return c},calculateUTF16asUTF8:function(a){var b=0,c=0;d.UTF16toUTF8(a,function(a){++b;c+=128>a?1:2048>a?2:65536>a?3:4});return[b,c]}},k=String.fromCharCode;d.arraySource=function(a){if(!Array.isArray(a))throw TypeError("Illegal argument: "+typeof a);var b=0;return function(){return b>=a.length?null:a[b++]}};d.arrayDestination=function(a){if(!Array.isArray(a))throw TypeError("Illegal argument: "+typeof a);
return Array.prototype.push.bind(a)};d.stringSource=function(a){if("string"!==typeof a)throw TypeError("Illegal argument: "+typeof a);var b=0;return function(){return b>=a.length?null:a.charCodeAt(b++)}};d.stringDestination=function(){var a=[],b=[];return function(){if(0===arguments.length)return b.join("")+k.apply(String,a);1024<a.length+arguments.length&&(b.push(k.apply(String,a)),a.length=0);Array.prototype.push.apply(a,arguments)}};d.assertCharCode=function(a){if("number"!==typeof a||a!==a)throw TypeError("Illegal char code: "+
typeof a);if(0>a||65535<a)throw RangeError("Illegal char code: "+a);return a};d.assertCodePoint=function(a){if("number"!==typeof a||a!==a)throw TypeError("Illegal code point: "+typeof a);if(0>a||a>d.MAX_CODEPOINT)throw RangeError("Illegal code point: "+a);return a};d.fromCodePoint=function(a){var b,c=0,e=arguments,l=e.length;d.UTF8toUTF16(function(){return c<l?d.assertCodePoint(e[c++]):null},b=d.stringDestination());return b()};d.codePointAt=function(a,b){if("string"!==typeof a&&!(a&&a instanceof
String)||"number"!==typeof b)throw TypeError("Illegal arguments: "+typeof a+", "+typeof b);var c,e;if(!(0>b||b>=(c=a.length)))return d.UTF16toUTF8(function(){return"undefined"===typeof e&&b<c?a.charCodeAt(b++):null},function(a){e=a}),e};d.polyfill=function(a){if(!String.fromCodePoint||a)String.fromCodePoint=d.fromCodePoint;if(!String.prototype.codePointAt||a)String.prototype.codePointAt=function(a){return d.codePointAt(this,a)};return d};return d}
1133907
function primitive(str) {
	if (typeof str !== 'string')
		return str
	if (str === 'null')
		return null
	if (str === 'undefined')
		return undefined
	if (str === 'true')
		return true
	if (str === 'false')
		return false
	if (str === 'true')
		return true
	if (str === 'NaN')
		return NaN
	//if (str === 'Infinity')
	//	return Number.POSITIVE_INFINITY
	let ret
	if (str.indexOf('.') >= 0)
		ret = Number.parseFloat(str)
	else
		ret = Number.parseInt(str)
	if (!Number.isNaN(ret))
		return ret
	return str
}
266773
function begins(query, node) {
  var value = node[query.name]

  return (
    typeof value === 'string' &&
    value.slice(0, query.value.length) === query.value
  )
}
1209457
public void print() {
        /*
        System.out.println(m00 + " " + m01 + " " + m02 + " " + m03 + "\n" +
                           m10 + " " + m11 + " " + m12 + " " + m13 + "\n" +
                           m20 + " " + m21 + " " + m22 + " " + m23 + "\n" +
                           m30 + " " + m31 + " " + m32 + " " + m33 + "\n");
         */
        int big = (int) Math.abs(Math.max(Math.max(Math.max(Math.max(Math.abs(m00), Math.abs(m01)),
            Math.max(Math.abs(m02), Math.abs(m03))),
            Math.max(Math.max(Math.abs(m10), Math.abs(m11)),
                Math.max(Math.abs(m12), Math.abs(m13)))),
                Math.max(Math.max(Math.max(Math.abs(m20), Math.abs(m21)),
                    Math.max(Math.abs(m22), Math.abs(m23))),
                    Math.max(Math.max(Math.abs(m30), Math.abs(m31)),
                        Math.max(Math.abs(m32), Math.abs(m33))))));

        int digits = 1;
        if (Double.isNaN(big) || Double.isInfinite(big)) {  // avoid infinite loop
            digits = 5;
        } else {
            while ((big /= 10) != 0) digits++;  // cheap log()
        }

        System.out.println(nfs(m00, digits, 4) + " " +
                           nfs(m01, digits, 4) + " " +
                           nfs(m02, digits, 4) + " " +
                           nfs(m03, digits, 4));

        System.out.println(nfs(m10, digits, 4) + " " +
                           nfs(m11, digits, 4) + " " +
                           nfs(m12, digits, 4) + " " +
                           nfs(m13, digits, 4));

        System.out.println(nfs(m20, digits, 4) + " " +
                           nfs(m21, digits, 4) + " " +
                           nfs(m22, digits, 4) + " " +
                           nfs(m23, digits, 4));

        System.out.println(nfs(m30, digits, 4) + " " +
                           nfs(m31, digits, 4) + " " +
                           nfs(m32, digits, 4) + " " +
                           nfs(m33, digits, 4));

        System.out.println();
    }
1349164
@SuppressWarnings({"UnusedDeclaration"})
    public static void main(String[] args){
        Syntax syntax = new Syntax();

        Matcher Q               = syntax.add("Q",              ch('\''));
        Matcher DIGIT           = syntax.add("DIGIT",          range("0-9"));
        Matcher PUBID_CHAR     = syntax.add("PUBID_CHAR",   or(any(" \r\n"), range("A-Z"), range("a-z"), DIGIT, any("-'()+,./:=?;!*#@$_%")));
        Matcher PUBID_CHAR_NQ     = syntax.add("PUBID_CHAR_NQ",   minus(PUBID_CHAR, Q));
        Matcher SPECIAL_CHAR     = syntax.add("SPECIAL_CHAR",   any("^[]-^&\\<"));
        Matcher NON_SPECIAL_CHAR = syntax.add("NON_SPECIAL_CHAR",   not(SPECIAL_CHAR));


//        Matcher GT              = syntax.add("GT",             ch('>'));
//        Matcher BRACKET_CLOSE   = syntax.add("BRACKET_CLOSE",  ch(']'));
//        Matcher DQ              = syntax.add("DQ",             ch('"'));

//        Matcher HEX_DIGIT       = syntax.add("HEX_DIGIT",      or(DIGIT, range("a-f"), range("A-F")));
//        Matcher WS              = syntax.add("WS",             any(" \t\n\r"));
//        Matcher ENCODING_START  = syntax.add("ENCODING_START", or(range("A-Z"), range("a-z")));
//        Matcher ENCODING_PART   = syntax.add("ENCODING_PART",  or(ENCODING_START, DIGIT, any("._-")));
//        Matcher CHAR            = syntax.add("CHAR",           or(any("\t\n\r"), range(" -\uD7FF"), range("\uE000-\uFFFD")/*, range("\u10000-\u10FFFF")*/));
//        Matcher DASH            = syntax.add("DASH",           ch('-'));
//        Matcher NDASH           = syntax.add("NDASH",          minus(CHAR, ch('-')));
//        Matcher NAME_START      = syntax.add("NAME_START",     or(ch(':'), range("A-Z"), ch('_'), range("a-z"), range("\u00C0-\u00D6"), range("\u00D8-\u00F6"), range("\u00F8-\u02FF"), range("\u0370-\u037D"), range("\u037F-\u1FFF"), range("\u200C-\u200D"), range("\u2070-\u218F"), range("\u2C00-\u2FEF"), range("\u3001-\uD7FF"), range("\uF900-\uFDCF"), range("\uFDF0-\uFFFD")/*, range("\u10000-\uEFFFF")*/));
//        Matcher NAME_PART       = syntax.add("NAME_PART",      or(NAME_START, ch('-'), ch('.'), DIGIT,  ch('\u00B7'), range("\u0300-\u036F"), range("\u203F-\u2040")));
//        Matcher NCNAME_START    = syntax.add("NCNAME_START",   minus(NAME_START, ch(':')));
//        Matcher NCNAME_PART     = syntax.add("NCNAME_PART",    minus(NAME_PART, ch(':')));

//        Rule rule = new Rule();
//        rule.node = new Node();
//        syntax.add("Rule1", rule);

        NBLREditor editor = new NBLREditor(syntax);
        editor.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        editor.setVisible(true);
    }
1249588
function queryfn(query, oldscope, cb, A, B) {
	var aaa = query.sources.length;

	var ms;
	query.sourceslen = query.sources.length;
	var slen = query.sourceslen;
	query.query = query; // TODO Remove to prevent memory leaks
	query.A = A;
	query.B = B;
	query.cb = cb;
	query.oldscope = oldscope;

	// Run all subqueries before main statement
	if (query.queriesfn) {
		query.sourceslen += query.queriesfn.length;
		slen += query.queriesfn.length;

		query.queriesdata = [];

		//		console.log(8);
		query.queriesfn.forEach(function(q, idx) {
			//			if(query.explain) ms = Date.now();
			//console.log(18,idx);
			//			var res = flatArray(q(query.params,null,queryfn2,(-idx-1),query));

			//			var res = flatArray(queryfn(q.query,null,queryfn2,(-idx-1),query));
			//			console.log(A,B);
			// console.log(q);
			q.query.params = query.params;
			//			query.queriesdata[idx] =

			//	if(false) {
			//			queryfn(q.query,query.oldscope,queryfn2,(-idx-1),query);
			//	} else {
			queryfn2([], -idx - 1, query);
			//	}

			//			console.log(27,q);

			//			query.explaination.push({explid: query.explid++, description:'Query '+idx,ms:Date.now()-ms});
			//			query.queriesdata[idx] = res;
			//			return res;
		});
		//		console.log(9,query.queriesdata.length);
		//		console.log(query.queriesdata[0]);
	}

	var scope;
	if (!oldscope) scope = {};
	else scope = cloneDeep(oldscope);
	query.scope = scope;

	// First - refresh data sources

	var result;
	query.sources.forEach(function(source, idx) {
		//		source.data = query.database.tables[source.tableid].data;
		//		console.log(666,idx);
		source.query = query;
		var rs = source.datafn(query, query.params, queryfn2, idx, alasql);
		//		console.log(333,rs);
		if (typeof rs !== 'undefined') {
			// TODO - this is a hack: check if result is array - check all cases and
			// make it more logical
			if ((query.intofn || query.intoallfn) && Array.isArray(rs)) rs = rs.length;
			result = rs;
		}
		//
		// Ugly hack to use in query.wherefn and source.srcwherefns functions
		// constructions like this.queriesdata['test'].
		// I can elimite it with source.srcwherefn.bind(this)()
		// but it may be slow.
		//
		source.queriesdata = query.queriesdata;
	});
	if (query.sources.length == 0 || 0 === slen) result = queryfn3(query);
	//	console.log(82,aaa,slen,query.sourceslen, query.sources.length);
	return result;
}