specific-idstring  = idstring *( ":" idstring ) idstring           = 1*idchar idchar             = ALPHA / DIGIT / "." / "-"
497857
function isValidIdentifierCharacter(ch) {
  if (!ch) {
    return false
  }

  return (
    0x2d == code(ch) || // '-'
    0x2e == code(ch) || // '.'
    0x3a == code(ch) || // ':'
    inRange(code(ch), 0x30, 0x39) || // 0-9 (DIGIT)
    inRange(code(ch), 0x61, 0x7a) || // a-z (ALPHA)
    inRange(code(ch), 0x41, 0x5a)    // A-Z (ALPHA)
  )
}
889182
function _getId($string)
	{
		if (preg_match('/id=("([^"]*)"|\'([^\']*)\'|[^>\s]*)([^>]*)?>/is', $string, $match)) {
			//preg_match('/name=["\']?([\w\s]*)["\']?[\s>]/i', $string, $match)) { -- did not work as expected
			$val_match = trim($match[1]);
			$val_match = trim($val_match, '"\'');
			unset($string);
			return $val_match;
		}
		return false;
	}
367977
public static String idx( String str, int index, char c ) {

        char[] chars = str.toCharArray();
        Chr.idx( chars, index, c );
        return new String( chars );
    }
43921
def parametrize(self, operator, params):
        
        return (CaselessKeyword(operator, identChars=alphanums) +
                self.parameter(params))
1068055
public static boolean isLetterAndNumber(String string) {
        boolean result = isNotEmpty(string);
        int idx = 0;
        int len = string.length();
        while (result) {
            if (idx >= len) {
                break;
            }
            char c = string.charAt(idx);
            result = isLetter(c) || isNumber(c);
            idx++;
        }
        return result;
    }
1192854
public static String asString(byte id) {
        switch (id) {
            case STOP:
                return "stop(0)";
            case VOID:
                return "void(1)";
            case BOOL:
                return "bool(2)";
            case BYTE:
                return "byte(3)";
            case DOUBLE:
                return "double(4)";
            // case 5:
            case I16:
                return "i16(6)";
            // case 7:
            case I32:
                // ENUM is same as I32.
                return "i32(8)";
            // case 9:
            case I64:
                return "i64(10)";
            case STRING:
                // BINARY is same as STRING.
                return "string(11)";
            case STRUCT:
                return "struct(12)";
            case MAP:
                return "map(13)";
            case SET:
                return "set(14)";
            case LIST:
                return "list(15)";
            default:
                return "unknown(" + id + ")";
        }
    }
466484
def t_ID(t):
    '
    if t.value in keywords:
        t.type = t.value.upper()
    return t
1000501
private static String digits(long val, int digits) {
		long hi = 1L << (digits * 4);
		return Long.toHexString(hi | (val & (hi - 1))).substring(1);
	}
640123
static private StringBuilder formatLineId(StringBuilder buffer, int value) {
        char[] chars = new char[4];
        for (int i = 3; i >= 0; i--) {
            chars[i] = (char) HEX_BYTES[(value % 16) & 0xF];
            value >>= 4;
        }
        return buffer.append(chars);
    }
427073
private static boolean isIdentifierChar(int c)
    {
        return (c >= '0' && c <= '9')
            || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
            || c == '-' || c == '+' || c == '.' || c == '_' || c == '&';
    }
634265
def get_string_index_oid(self, s):
        """"""
        return (len(self.get_bytes(s)), ) + self.get_bytes(s)
260065
private int idToInt(String value) {
    try {
      return Integer.valueOf(value);
    } catch (NumberFormatException e) {
      throw new ConfigurationException("invalid type ID: " + value);
    }
  }
1038993
def id?(str)
      token = @tokens[@p]
      return false unless token && token[0] == :id
      return false unless token[1] == str
      @p += 1
      token[1]
    end
189270
function() {
        var ch = exprICode(index),
          start = index,
          identifier;

        if (isIdentifierStart(ch)) {
          index++;
        } else {
          throwError("Unexpected " + exprI(index), index);
        }

        while (index < length) {
          ch = exprICode(index);
          if (isIdentifierPart(ch)) {
            index++;
          } else {
            break;
          }
        }
        identifier = expr.slice(start, index);

        if (literals.hasOwnProperty(identifier)) {
          return {
            type: code.LITERAL,
            value: literals[identifier],
            raw: identifier
          };
        } else if (identifier === this_str) {
          return { type: code.THIS_EXP };
        } else {
          return {
            type: code.IDENTIFIER,
            name: identifier
          };
        }
      }
1090276
def str_id(self):
        ""
        id_or_name = self.id_or_name
        if id_or_name is not None and isinstance(id_or_name, str):
            return id_or_name
        return None
579136
def check_id(type, idstring)
      if idstring.class == Fixnum
        return make_read_url(type, idstring)
      end

      if (idstring.class == String)
        return idstring if idstring.index("http") == 0
        return ref_by_formatted_id(type, idstring.split("|")[1]) if idstring.index("FormattedID") == 0
      end
      make_read_url(type, idstring)
    end
394583
def parse_id_literal(ast, _variables=None):
    """"""
    if isinstance(ast, (StringValueNode, IntValueNode)):
        return ast.value
    return INVALID