Integer[0] is the column size and Integer[1] is the radix
965810
private Integer[] getColumnSizeAndRadix(Column column)
    {
        Integer[] col_size_radix = {null, null};
        // This looks similar to VoltType.getTypePrecisionAndRadix.  However,
        // the String/VARBINARY values depend on the schema, not an intrinsic property
        // of the type, so it stays here for now.
        VoltType type = VoltType.get((byte) column.getType());
        switch(type)
        {
        //
        case TINYINT:
        case SMALLINT:
        case INTEGER:
        case BIGINT:
        case TIMESTAMP:
            col_size_radix[0] = (column.getSize() * 8) - 1;
            col_size_radix[1] = 2;
            break;
        case FLOAT:
            col_size_radix[0] = 53;  // magic for double
            col_size_radix[1] = 2;
            break;
        case STRING:
            col_size_radix[0] = column.getSize();
            col_size_radix[1] = null;
            break;
        case DECIMAL:
            col_size_radix[0] = VoltDecimalHelper.kDefaultPrecision;
            col_size_radix[1] = 10;
            break;
        case VARBINARY:
            col_size_radix[0] = column.getSize();
            col_size_radix[1] = null;
            break;
        default:
            // XXX What's the right behavior here?
        }
        return col_size_radix;
    }
945035
public static void partialRadixSort(int[] data) {
    final int radix = 8;
    int shift = 16;
    int mask = 0xFF0000;
    int[] copy = new int[data.length];
    int[] histogram = new int[(1 << radix) + 1];
    while (shift < 32) {
      for (int i = 0; i < data.length; ++i) {
        ++histogram[((data[i] & mask) >>> shift) + 1];
      }
      for (int i = 0; i < 1 << radix; ++i) {
        histogram[i + 1] += histogram[i];
      }
      for (int i = 0; i < data.length; ++i) {
        copy[histogram[(data[i] & mask) >>> shift]++] = data[i];
      }
      System.arraycopy(copy, 0, data, 0, data.length);
      shift += radix;
      mask <<= radix;
      Arrays.fill(histogram, 0);
    }
  }
217434
function(encoded) {
      if (encoded instanceof Array) {
        encoded = encoded.map(function(chunk) {return chunk.replace(/^0x/g, '')}).join('');
      }

      // Each symbol is 4 bits
      var result = [];
      var nextIndex = 0;
      while (nextIndex < encoded.length) {
        var schemaLength = parseInt(encoded.slice(nextIndex, nextIndex + 1 * 2), 16);
        var idLength = parseInt(encoded.slice(nextIndex + (1 + schemaLength) * 2, nextIndex + (1 + schemaLength + 2) * 2), 16);

        var schema = encoded.slice(nextIndex + 1 * 2, nextIndex + (1 + schemaLength) * 2);
        // Convert to string
        schema = hexToString(schema);
        var idHex = encoded.slice(nextIndex + (1 + schemaLength + 2) * 2, nextIndex + (1 + schemaLength + 2 + idLength) * 2);
        var id = schema.match(allowedProtocolsRegExp) ? idHex : hexToString(idHex);
        result.push(schema + ':' + id);

        // Get full cells
        var cellsPerId = Math.ceil((1 + schemaLength + 2 + idLength) / 32);
        nextIndex += cellsPerId * 32 * 2;
      }

      return result;
    }
115183
function insertIntegerToByteArray (number, buffer, from, size) {
  let value = bigInt(number) // convert a number-like object into a big integer

  for (let pos = 0; pos < size; pos++) {
    const divmod = value.divmod(256)
    buffer[from + pos] = divmod.remainder.toJSNumber()
    value = divmod.quotient
  }

  return buffer
}
913023
Integer getColBufLen(int i) {

        int          size;
        int          type;
        ColumnSchema column;

        column = table.getColumn(i);
        type   = column.getDataType().getJDBCTypeCode();

        switch (type) {

            case Types.SQL_CHAR :
            case Types.SQL_CLOB :
            case Types.VARCHAR_IGNORECASE :
            case Types.SQL_VARCHAR : {
                size = column.getDataType().precision > Integer.MAX_VALUE
                       ? Integer.MAX_VALUE
                       : (int) column.getDataType().precision;

                if (size == 0) {}
                else if (size > HALF_MAX_INT) {
                    size = 0;
                } else {
                    size = 2 * size;
                }

                break;
            }
            case Types.SQL_BINARY :
            case Types.SQL_BLOB :
            case Types.SQL_VARBINARY : {
                size = column.getDataType().precision > Integer.MAX_VALUE
                       ? Integer.MAX_VALUE
                       : (int) column.getDataType().precision;

                break;
            }
            case Types.SQL_BIGINT :
            case Types.SQL_DOUBLE :
            case Types.SQL_FLOAT :
            case Types.SQL_DATE :
            case Types.SQL_REAL :
            case Types.SQL_TIME_WITH_TIME_ZONE :
            case Types.SQL_TIME : {
                size = 8;

                break;
            }
            case Types.SQL_TIMESTAMP_WITH_TIME_ZONE :
            case Types.SQL_TIMESTAMP : {
                size = 12;

                break;
            }
            case Types.SQL_INTEGER :
            case Types.SQL_SMALLINT :
            case Types.TINYINT : {
                size = 4;

                break;
            }
            case Types.SQL_BOOLEAN : {
                size = 1;

                break;
            }
            default : {
                size = 0;

                break;
            }
        }

        return (size > 0) ? ValuePool.getInt(size)
                          : null;
    }
1306593
def unsigned_integer(self, column, auto_increment=False):
        
        return self.integer(column, auto_increment, True)
683937
private static byte[] writeInt(int value) throws IOException {
        byte[] b = new byte[4];

        b[0] = (byte) (value & 0x000000FF);
        b[1] = (byte) ((value & 0x0000FF00) >> 8);
        b[2] = (byte) ((value & 0x00FF0000) >> 16);
        b[3] = (byte) ((value & 0xFF000000) >> 24);

        return b;
    }
755201
def integer(self, column, auto_increment=False, unsigned=False):
        
        return self._add_column(
            "integer", column, auto_increment=auto_increment, unsigned=unsigned
        )
40420
function binb(x, len) {
        var j, i, l,
          W = new Array(80),
          hash = new Array(16),
          //Initial hash values
          H = [
            new int64(0x6a09e667, -205731576),
            new int64(-1150833019, -2067093701),
            new int64(0x3c6ef372, -23791573),
            new int64(-1521486534, 0x5f1d36f1),
            new int64(0x510e527f, -1377402159),
            new int64(-1694144372, 0x2b3e6c1f),
            new int64(0x1f83d9ab, -79577749),
            new int64(0x5be0cd19, 0x137e2179)
          ],
          T1 = new int64(0, 0),
          T2 = new int64(0, 0),
          a = new int64(0, 0),
          b = new int64(0, 0),
          c = new int64(0, 0),
          d = new int64(0, 0),
          e = new int64(0, 0),
          f = new int64(0, 0),
          g = new int64(0, 0),
          h = new int64(0, 0),
          //Temporary variables not specified by the document
          s0 = new int64(0, 0),
          s1 = new int64(0, 0),
          Ch = new int64(0, 0),
          Maj = new int64(0, 0),
          r1 = new int64(0, 0),
          r2 = new int64(0, 0),
          r3 = new int64(0, 0);

        if (sha512_k === undefined) {
          //SHA512 constants
          sha512_k = [
            new int64(0x428a2f98, -685199838), new int64(0x71374491, 0x23ef65cd),
            new int64(-1245643825, -330482897), new int64(-373957723, -2121671748),
            new int64(0x3956c25b, -213338824), new int64(0x59f111f1, -1241133031),
            new int64(-1841331548, -1357295717), new int64(-1424204075, -630357736),
            new int64(-670586216, -1560083902), new int64(0x12835b01, 0x45706fbe),
            new int64(0x243185be, 0x4ee4b28c), new int64(0x550c7dc3, -704662302),
            new int64(0x72be5d74, -226784913), new int64(-2132889090, 0x3b1696b1),
            new int64(-1680079193, 0x25c71235), new int64(-1046744716, -815192428),
            new int64(-459576895, -1628353838), new int64(-272742522, 0x384f25e3),
            new int64(0xfc19dc6, -1953704523), new int64(0x240ca1cc, 0x77ac9c65),
            new int64(0x2de92c6f, 0x592b0275), new int64(0x4a7484aa, 0x6ea6e483),
            new int64(0x5cb0a9dc, -1119749164), new int64(0x76f988da, -2096016459),
            new int64(-1740746414, -295247957), new int64(-1473132947, 0x2db43210),
            new int64(-1341970488, -1728372417), new int64(-1084653625, -1091629340),
            new int64(-958395405, 0x3da88fc2), new int64(-710438585, -1828018395),
            new int64(0x6ca6351, -536640913), new int64(0x14292967, 0xa0e6e70),
            new int64(0x27b70a85, 0x46d22ffc), new int64(0x2e1b2138, 0x5c26c926),
            new int64(0x4d2c6dfc, 0x5ac42aed), new int64(0x53380d13, -1651133473),
            new int64(0x650a7354, -1951439906), new int64(0x766a0abb, 0x3c77b2a8),
            new int64(-2117940946, 0x47edaee6), new int64(-1838011259, 0x1482353b),
            new int64(-1564481375, 0x4cf10364), new int64(-1474664885, -1136513023),
            new int64(-1035236496, -789014639), new int64(-949202525, 0x654be30),
            new int64(-778901479, -688958952), new int64(-694614492, 0x5565a910),
            new int64(-200395387, 0x5771202a), new int64(0x106aa070, 0x32bbd1b8),
            new int64(0x19a4c116, -1194143544), new int64(0x1e376c08, 0x5141ab53),
            new int64(0x2748774c, -544281703), new int64(0x34b0bcb5, -509917016),
            new int64(0x391c0cb3, -976659869), new int64(0x4ed8aa4a, -482243893),
            new int64(0x5b9cca4f, 0x7763e373), new int64(0x682e6ff3, -692930397),
            new int64(0x748f82ee, 0x5defb2fc), new int64(0x78a5636f, 0x43172f60),
            new int64(-2067236844, -1578062990), new int64(-1933114872, 0x1a6439ec),
            new int64(-1866530822, 0x23631e28), new int64(-1538233109, -561857047),
            new int64(-1090935817, -1295615723), new int64(-965641998, -479046869),
            new int64(-903397682, -366583396), new int64(-779700025, 0x21c0c207),
            new int64(-354779690, -840897762), new int64(-176337025, -294727304),
            new int64(0x6f067aa, 0x72176fba), new int64(0xa637dc5, -1563912026),
            new int64(0x113f9804, -1090974290), new int64(0x1b710b35, 0x131c471b),
            new int64(0x28db77f5, 0x23047d84), new int64(0x32caab7b, 0x40c72493),
            new int64(0x3c9ebe0a, 0x15c9bebc), new int64(0x431d67c4, -1676669620),
            new int64(0x4cc5d4be, -885112138), new int64(0x597f299c, -60457430),
            new int64(0x5fcb6fab, 0x3ad6faec), new int64(0x6c44198c, 0x4a475817)
          ];
        }

        for (i = 0; i < 80; i += 1) {
          W[i] = new int64(0, 0);
        }

        // append padding to the source string. The format is described in the FIPS.
        x[len >> 5] |= 0x80 << (24 - (len & 0x1f));
        x[((len + 128 >> 10) << 5) + 31] = len;
        l = x.length;
        for (i = 0; i < l; i += 32) { //32 dwords is the block size
          int64copy(a, H[0]);
          int64copy(b, H[1]);
          int64copy(c, H[2]);
          int64copy(d, H[3]);
          int64copy(e, H[4]);
          int64copy(f, H[5]);
          int64copy(g, H[6]);
          int64copy(h, H[7]);

          for (j = 0; j < 16; j += 1) {
            W[j].h = x[i + 2 * j];
            W[j].l = x[i + 2 * j + 1];
          }

          for (j = 16; j < 80; j += 1) {
            //sigma1
            int64rrot(r1, W[j - 2], 19);
            int64revrrot(r2, W[j - 2], 29);
            int64shr(r3, W[j - 2], 6);
            s1.l = r1.l ^ r2.l ^ r3.l;
            s1.h = r1.h ^ r2.h ^ r3.h;
            //sigma0
            int64rrot(r1, W[j - 15], 1);
            int64rrot(r2, W[j - 15], 8);
            int64shr(r3, W[j - 15], 7);
            s0.l = r1.l ^ r2.l ^ r3.l;
            s0.h = r1.h ^ r2.h ^ r3.h;

            int64add4(W[j], s1, W[j - 7], s0, W[j - 16]);
          }

          for (j = 0; j < 80; j += 1) {
            //Ch
            Ch.l = (e.l & f.l) ^ (~e.l & g.l);
            Ch.h = (e.h & f.h) ^ (~e.h & g.h);

            //Sigma1
            int64rrot(r1, e, 14);
            int64rrot(r2, e, 18);
            int64revrrot(r3, e, 9);
            s1.l = r1.l ^ r2.l ^ r3.l;
            s1.h = r1.h ^ r2.h ^ r3.h;

            //Sigma0
            int64rrot(r1, a, 28);
            int64revrrot(r2, a, 2);
            int64revrrot(r3, a, 7);
            s0.l = r1.l ^ r2.l ^ r3.l;
            s0.h = r1.h ^ r2.h ^ r3.h;

            //Maj
            Maj.l = (a.l & b.l) ^ (a.l & c.l) ^ (b.l & c.l);
            Maj.h = (a.h & b.h) ^ (a.h & c.h) ^ (b.h & c.h);

            int64add5(T1, h, s1, Ch, sha512_k[j], W[j]);
            int64add(T2, s0, Maj);

            int64copy(h, g);
            int64copy(g, f);
            int64copy(f, e);
            int64add(e, d, T1);
            int64copy(d, c);
            int64copy(c, b);
            int64copy(b, a);
            int64add(a, T1, T2);
          }
          int64add(H[0], H[0], a);
          int64add(H[1], H[1], b);
          int64add(H[2], H[2], c);
          int64add(H[3], H[3], d);
          int64add(H[4], H[4], e);
          int64add(H[5], H[5], f);
          int64add(H[6], H[6], g);
          int64add(H[7], H[7], h);
        }

        //represent the hash as an array of 32-bit dwords
        for (i = 0; i < 8; i += 1) {
          hash[2 * i] = H[i].h;
          hash[2 * i + 1] = H[i].l;
        }
        return hash;
      }
517589
def _int_size(x):
    """"""
    if -0x80 <= x <= 0x7F:
        return 1
    elif -0x8000 <= x <= 0x7FFF:
        return 2
    elif -0x80000000 <= x <= 0x7FFFFFFF:
        return 4
    elif long(-0x8000000000000000) <= x <= long(0x7FFFFFFFFFFFFFFF):
        return 8
    else:
        raise RuntimeError("Cannot represent value: " + str(x))
805918
public static INDArray col2im(INDArray col, int sy, int sx, int ph, int pw, int h, int w) {
        //number of images
        long n = col.size(0);
        //number of columns
        long c = col.size(1);
        //kernel height
        long kh = col.size(2);
        //kernel width
        long kw = col.size(3);
        //out height
        long outH = col.size(4);
        //out width
        long outW = col.size(5);

        INDArray img = Nd4j.create(n, c, h + 2 * ph + sy - 1, w + 2 * pw + sx - 1);
        for (int i = 0; i < kh; i++) {
            //iterate over the kernel rows
            long iLim = i + sy * outH;
            for (int j = 0; j < kw; j++) {
                //iterate over the kernel columns
                long jLim = j + sx * outW;
                INDArrayIndex[] indices = new INDArrayIndex[] {NDArrayIndex.all(), NDArrayIndex.all(),
                                NDArrayIndex.interval(i, sy, iLim), NDArrayIndex.interval(j, sx, jLim)};

                INDArray get = img.get(indices);

                INDArray colAdd = col.get(NDArrayIndex.all(), NDArrayIndex.all(), NDArrayIndex.point(i),
                                NDArrayIndex.point(j), NDArrayIndex.all(), NDArrayIndex.all());
                get.addi(colAdd);
                img.put(indices, get);

            }
        }

        //return the subset of the padded image relative to the height/width of the image and the padding width/height
        return img.get(NDArrayIndex.all(), NDArrayIndex.all(), NDArrayIndex.interval(ph, ph + h),
                        NDArrayIndex.interval(pw, pw + w));
    }
145554
function range(n,type) {
  n = (typeof n !== 'undefined') ?  n : 0;
  if (!(Number.isInteger(n))) throw Error("Error in range: Value must be an integer");
  let array;
    
  if(type=='Uint8')  array = new Uint8Array(n);
  if(type=='Uint16') array = new Uint16Array(n);
  if(type=='Uint32') array = new Uint32Array(n);
  if(type=='Int8')  array = new Int8Array(n);
  if(type=='Int16') array = new Int16Array(n);
  if(type=='Int32') array = new Int32Array(n);
  if(type=='Float32')  array = new Float32Array(n);
  if((typeof type === 'undefined') || !array)array = new Array(n);
    
  for(let i=0;i<n;i++)array[i]=i;
  return array;
}
1272486
def p_sigtypes(self, p):
        ''
        p[0] = p[1] + (p[2],)
        p.set_lineno(0, p.lineno(1))
1285933
public static int string2int(String s, int radix)
        throws NumberFormatException {
        if (radix == 10) {
            return Integer.parseInt(s, radix);
        } else {
            char[] cs = s.toCharArray();
            int limit = Integer.MAX_VALUE / (radix/2);
            int n = 0;
            for (int i = 0; i < cs.length; i++) {
                int d = Character.digit(cs[i], radix);
                if (n < 0 ||
                    n > limit ||
                    n * radix > Integer.MAX_VALUE - d)
                    throw new NumberFormatException();
                n = n * radix + d;
            }
            return n;
        }
    }
931476
public final void mNUM_INT() throws RecognitionException {
		try {
			int _type = NUM_INT;
			int _channel = DEFAULT_TOKEN_CHANNEL;
			CommonToken f1=null;
			CommonToken f2=null;
			CommonToken f3=null;
			CommonToken f4=null;

			boolean isDecimal=false; Token t=null;
			// hql.g:804:2: ( '.' ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )? | ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) ( ( 'l' ) |{...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? |f4= FLOAT_SUFFIX ) )? )
			int alt20=2;
			int LA20_0 = input.LA(1);
			if ( (LA20_0=='.') ) {
				alt20=1;
			}
			else if ( ((LA20_0 >= '0' && LA20_0 <= '9')) ) {
				alt20=2;
			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 20, 0, input);
				throw nvae;
			}

			switch (alt20) {
				case 1 :
					// hql.g:804:6: '.' ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )?
					{
					match('.'); if (state.failed) return;
					if ( state.backtracking==0 ) {_type = DOT;}
					// hql.g:805:4: ( ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )? )?
					int alt8=2;
					int LA8_0 = input.LA(1);
					if ( ((LA8_0 >= '0' && LA8_0 <= '9')) ) {
						alt8=1;
					}
					switch (alt8) {
						case 1 :
							// hql.g:805:6: ( '0' .. '9' )+ ( EXPONENT )? (f1= FLOAT_SUFFIX )?
							{
							// hql.g:805:6: ( '0' .. '9' )+
							int cnt5=0;
							loop5:
							while (true) {
								int alt5=2;
								int LA5_0 = input.LA(1);
								if ( ((LA5_0 >= '0' && LA5_0 <= '9')) ) {
									alt5=1;
								}

								switch (alt5) {
								case 1 :
									// hql.g:
									{
									if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
										input.consume();
										state.failed=false;
									}
									else {
										if (state.backtracking>0) {state.failed=true; return;}
										MismatchedSetException mse = new MismatchedSetException(null,input);
										recover(mse);
										throw mse;
									}
									}
									break;

								default :
									if ( cnt5 >= 1 ) break loop5;
									if (state.backtracking>0) {state.failed=true; return;}
									EarlyExitException eee = new EarlyExitException(5, input);
									throw eee;
								}
								cnt5++;
							}

							// hql.g:805:18: ( EXPONENT )?
							int alt6=2;
							int LA6_0 = input.LA(1);
							if ( (LA6_0=='e') ) {
								alt6=1;
							}
							switch (alt6) {
								case 1 :
									// hql.g:805:19: EXPONENT
									{
									mEXPONENT(); if (state.failed) return;

									}
									break;

							}

							// hql.g:805:30: (f1= FLOAT_SUFFIX )?
							int alt7=2;
							int LA7_0 = input.LA(1);
							if ( (LA7_0=='d'||LA7_0=='f'||LA7_0=='m') ) {
								alt7=1;
							}
							switch (alt7) {
								case 1 :
									// hql.g:805:31: f1= FLOAT_SUFFIX
									{
									int f1Start986 = getCharIndex();
									int f1StartLine986 = getLine();
									int f1StartCharPos986 = getCharPositionInLine();
									mFLOAT_SUFFIX(); if (state.failed) return;
									f1 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, f1Start986, getCharIndex()-1);
									f1.setLine(f1StartLine986);
									f1.setCharPositionInLine(f1StartCharPos986);

									if ( state.backtracking==0 ) {t=f1;}
									}
									break;

							}

							if ( state.backtracking==0 ) {
												if (t != null && t.getText().toUpperCase().indexOf('F')>=0)
												{
													_type = NUM_FLOAT;
												}
												else if (t != null && t.getText().toUpperCase().indexOf('M')>=0)
												{
													_type = NUM_DECIMAL;
												}
												else
												{
													_type = NUM_DOUBLE; // assume double
												}
											}
							}
							break;

					}

					}
					break;
				case 2 :
					// hql.g:821:4: ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* ) ( ( 'l' ) |{...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? |f4= FLOAT_SUFFIX ) )?
					{
					// hql.g:821:4: ( '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )? | ( '1' .. '9' ) ( '0' .. '9' )* )
					int alt13=2;
					int LA13_0 = input.LA(1);
					if ( (LA13_0=='0') ) {
						alt13=1;
					}
					else if ( ((LA13_0 >= '1' && LA13_0 <= '9')) ) {
						alt13=2;
					}

					else {
						if (state.backtracking>0) {state.failed=true; return;}
						NoViableAltException nvae =
							new NoViableAltException("", 13, 0, input);
						throw nvae;
					}

					switch (alt13) {
						case 1 :
							// hql.g:821:6: '0' ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )?
							{
							match('0'); if (state.failed) return;
							if ( state.backtracking==0 ) {isDecimal = true;}
							// hql.g:822:4: ( ( 'x' ) ( HEX_DIGIT )+ | ( '0' .. '7' )+ )?
							int alt11=3;
							int LA11_0 = input.LA(1);
							if ( (LA11_0=='x') ) {
								alt11=1;
							}
							else if ( ((LA11_0 >= '0' && LA11_0 <= '7')) ) {
								alt11=2;
							}
							switch (alt11) {
								case 1 :
									// hql.g:822:6: ( 'x' ) ( HEX_DIGIT )+
									{
									// hql.g:822:6: ( 'x' )
									// hql.g:822:7: 'x'
									{
									match('x'); if (state.failed) return;
									}

									// hql.g:823:5: ( HEX_DIGIT )+
									int cnt9=0;
									loop9:
									while (true) {
										int alt9=2;
										switch ( input.LA(1) ) {
										case 'e':
											{
											int LA9_2 = input.LA(2);
											if ( ((LA9_2 >= '0' && LA9_2 <= '9')) ) {
												int LA9_5 = input.LA(3);
												if ( (!(((isDecimal)))) ) {
													alt9=1;
												}

											}
											else {
												alt9=1;
											}

											}
											break;
										case 'd':
										case 'f':
											{
											int LA9_3 = input.LA(2);
											if ( (!(((isDecimal)))) ) {
												alt9=1;
											}

											}
											break;
										case '0':
										case '1':
										case '2':
										case '3':
										case '4':
										case '5':
										case '6':
										case '7':
										case '8':
										case '9':
										case 'a':
										case 'b':
										case 'c':
											{
											alt9=1;
											}
											break;
										}
										switch (alt9) {
										case 1 :
											// hql.g:
											{
											if ( (input.LA(1) >= '0' && input.LA(1) <= '9')||(input.LA(1) >= 'a' && input.LA(1) <= 'f') ) {
												input.consume();
												state.failed=false;
											}
											else {
												if (state.backtracking>0) {state.failed=true; return;}
												MismatchedSetException mse = new MismatchedSetException(null,input);
												recover(mse);
												throw mse;
											}
											}
											break;

										default :
											if ( cnt9 >= 1 ) break loop9;
											if (state.backtracking>0) {state.failed=true; return;}
											EarlyExitException eee = new EarlyExitException(9, input);
											throw eee;
										}
										cnt9++;
									}

									}
									break;
								case 2 :
									// hql.g:832:6: ( '0' .. '7' )+
									{
									// hql.g:832:6: ( '0' .. '7' )+
									int cnt10=0;
									loop10:
									while (true) {
										int alt10=2;
										int LA10_0 = input.LA(1);
										if ( ((LA10_0 >= '0' && LA10_0 <= '7')) ) {
											alt10=1;
										}

										switch (alt10) {
										case 1 :
											// hql.g:
											{
											if ( (input.LA(1) >= '0' && input.LA(1) <= '7') ) {
												input.consume();
												state.failed=false;
											}
											else {
												if (state.backtracking>0) {state.failed=true; return;}
												MismatchedSetException mse = new MismatchedSetException(null,input);
												recover(mse);
												throw mse;
											}
											}
											break;

										default :
											if ( cnt10 >= 1 ) break loop10;
											if (state.backtracking>0) {state.failed=true; return;}
											EarlyExitException eee = new EarlyExitException(10, input);
											throw eee;
										}
										cnt10++;
									}

									}
									break;

							}

							}
							break;
						case 2 :
							// hql.g:834:5: ( '1' .. '9' ) ( '0' .. '9' )*
							{
							if ( (input.LA(1) >= '1' && input.LA(1) <= '9') ) {
								input.consume();
								state.failed=false;
							}
							else {
								if (state.backtracking>0) {state.failed=true; return;}
								MismatchedSetException mse = new MismatchedSetException(null,input);
								recover(mse);
								throw mse;
							}
							// hql.g:834:16: ( '0' .. '9' )*
							loop12:
							while (true) {
								int alt12=2;
								int LA12_0 = input.LA(1);
								if ( ((LA12_0 >= '0' && LA12_0 <= '9')) ) {
									alt12=1;
								}

								switch (alt12) {
								case 1 :
									// hql.g:
									{
									if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
										input.consume();
										state.failed=false;
									}
									else {
										if (state.backtracking>0) {state.failed=true; return;}
										MismatchedSetException mse = new MismatchedSetException(null,input);
										recover(mse);
										throw mse;
									}
									}
									break;

								default :
									break loop12;
								}
							}

							if ( state.backtracking==0 ) {isDecimal=true;}
							}
							break;

					}

					// hql.g:836:3: ( ( 'l' ) |{...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? |f4= FLOAT_SUFFIX ) )?
					int alt19=3;
					int LA19_0 = input.LA(1);
					if ( (LA19_0=='l') ) {
						alt19=1;
					}
					else if ( (LA19_0=='.'||(LA19_0 >= 'd' && LA19_0 <= 'f')||LA19_0=='m') ) {
						alt19=2;
					}
					switch (alt19) {
						case 1 :
							// hql.g:836:5: ( 'l' )
							{
							// hql.g:836:5: ( 'l' )
							// hql.g:836:6: 'l'
							{
							match('l'); if (state.failed) return;
							}

							if ( state.backtracking==0 ) { _type = NUM_LONG; }
							}
							break;
						case 2 :
							// hql.g:839:5: {...}? ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? |f4= FLOAT_SUFFIX )
							{
							if ( !((isDecimal)) ) {
								if (state.backtracking>0) {state.failed=true; return;}
								throw new FailedPredicateException(input, "NUM_INT", "isDecimal");
							}
							// hql.g:840:4: ( '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )? | EXPONENT (f3= FLOAT_SUFFIX )? |f4= FLOAT_SUFFIX )
							int alt18=3;
							switch ( input.LA(1) ) {
							case '.':
								{
								alt18=1;
								}
								break;
							case 'e':
								{
								alt18=2;
								}
								break;
							case 'd':
							case 'f':
							case 'm':
								{
								alt18=3;
								}
								break;
							default:
								if (state.backtracking>0) {state.failed=true; return;}
								NoViableAltException nvae =
									new NoViableAltException("", 18, 0, input);
								throw nvae;
							}
							switch (alt18) {
								case 1 :
									// hql.g:840:8: '.' ( '0' .. '9' )* ( EXPONENT )? (f2= FLOAT_SUFFIX )?
									{
									match('.'); if (state.failed) return;
									// hql.g:840:12: ( '0' .. '9' )*
									loop14:
									while (true) {
										int alt14=2;
										int LA14_0 = input.LA(1);
										if ( ((LA14_0 >= '0' && LA14_0 <= '9')) ) {
											alt14=1;
										}

										switch (alt14) {
										case 1 :
											// hql.g:
											{
											if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
												input.consume();
												state.failed=false;
											}
											else {
												if (state.backtracking>0) {state.failed=true; return;}
												MismatchedSetException mse = new MismatchedSetException(null,input);
												recover(mse);
												throw mse;
											}
											}
											break;

										default :
											break loop14;
										}
									}

									// hql.g:840:24: ( EXPONENT )?
									int alt15=2;
									int LA15_0 = input.LA(1);
									if ( (LA15_0=='e') ) {
										alt15=1;
									}
									switch (alt15) {
										case 1 :
											// hql.g:840:25: EXPONENT
											{
											mEXPONENT(); if (state.failed) return;

											}
											break;

									}

									// hql.g:840:36: (f2= FLOAT_SUFFIX )?
									int alt16=2;
									int LA16_0 = input.LA(1);
									if ( (LA16_0=='d'||LA16_0=='f'||LA16_0=='m') ) {
										alt16=1;
									}
									switch (alt16) {
										case 1 :
											// hql.g:840:37: f2= FLOAT_SUFFIX
											{
											int f2Start1188 = getCharIndex();
											int f2StartLine1188 = getLine();
											int f2StartCharPos1188 = getCharPositionInLine();
											mFLOAT_SUFFIX(); if (state.failed) return;
											f2 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, f2Start1188, getCharIndex()-1);
											f2.setLine(f2StartLine1188);
											f2.setCharPositionInLine(f2StartCharPos1188);

											if ( state.backtracking==0 ) {t=f2;}
											}
											break;

									}

									}
									break;
								case 2 :
									// hql.g:841:8: EXPONENT (f3= FLOAT_SUFFIX )?
									{
									mEXPONENT(); if (state.failed) return;

									// hql.g:841:17: (f3= FLOAT_SUFFIX )?
									int alt17=2;
									int LA17_0 = input.LA(1);
									if ( (LA17_0=='d'||LA17_0=='f'||LA17_0=='m') ) {
										alt17=1;
									}
									switch (alt17) {
										case 1 :
											// hql.g:841:18: f3= FLOAT_SUFFIX
											{
											int f3Start1206 = getCharIndex();
											int f3StartLine1206 = getLine();
											int f3StartCharPos1206 = getCharPositionInLine();
											mFLOAT_SUFFIX(); if (state.failed) return;
											f3 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, f3Start1206, getCharIndex()-1);
											f3.setLine(f3StartLine1206);
											f3.setCharPositionInLine(f3StartCharPos1206);

											if ( state.backtracking==0 ) {t=f3;}
											}
											break;

									}

									}
									break;
								case 3 :
									// hql.g:842:8: f4= FLOAT_SUFFIX
									{
									int f4Start1221 = getCharIndex();
									int f4StartLine1221 = getLine();
									int f4StartCharPos1221 = getCharPositionInLine();
									mFLOAT_SUFFIX(); if (state.failed) return;
									f4 = new CommonToken(input, Token.INVALID_TOKEN_TYPE, Token.DEFAULT_CHANNEL, f4Start1221, getCharIndex()-1);
									f4.setLine(f4StartLine1221);
									f4.setCharPositionInLine(f4StartCharPos1221);

									if ( state.backtracking==0 ) {t=f4;}
									}
									break;

							}

							if ( state.backtracking==0 ) {
											if (t != null && t.getText().toUpperCase().indexOf('F') >= 0)
											{
												_type = NUM_FLOAT;
											}
											else if (t != null && t.getText().toUpperCase().indexOf('M')>=0)
											{
												_type = NUM_DECIMAL;
											}
											else
											{
												_type = NUM_DOUBLE; // assume double
											}
										}
							}
							break;

					}

					}
					break;

			}
			state.type = _type;
			state.channel = _channel;
		}
		finally {
			// do for sure before leaving
		}
	}
858840
public static final int findInt(CharSequence cs, int radix, int beginIndex, int endIndex)
    {
        IntPredicate predicate = null;
        switch (radix)
        {
            case 8:
                predicate = Primitives::isOctalDigit;
                break;
            case 10:
                predicate = Primitives::isDecimalDigit;
                break;
            case 16:
                predicate = Primitives::isHexDigit;
                break;
            default:
                throw new UnsupportedOperationException("radix "+radix+" not supported");
        }
        int begin = CharSequences.indexOf(cs, predicate, beginIndex);
        int end = CharSequences.indexOf(cs, predicate.negate(), begin);
        return parseInt(cs, radix, begin, endIndex(end, endIndex));
    }
294026
function subBytes()
    {

        for ($i = 0; $i < 4; $i++) {
            for ($j = 0; $j < $this->Nb; $j++) $this->s[$i][$j] = $this->sBox[$this->s[$i][$j]];
        }
    }