protected Collection<AssemblyParseNumericToken> matchHex(int s, String buffer, int pos,
			boolean neg, AssemblyGrammar grammar) {
		int b = s;
		while (b < buffer.length()) {
			char c = buffer.charAt(b);
			if (('0' <= c && c <= '9') || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f')) {
				b++;
				continue;
			}
			break;
		}
		return makeToken(buffer.substring(pos, b), buffer.substring(s, b), 16, neg, grammar);
	}
Try to match a hexadecimal literal, following the optional sign and prefix

@param s the buffer cursor where the hex portion starts
@param buffer the input buffer
@param pos the start offset of the token parsed so far
@param neg true if the optional {@code -} is present
@param grammar the grammar containing this terminal
@return the parsed token, or null
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/symbol/AssemblyNumericTerminal.java