def _get_single_inc_gpr(asm_str):
    """returns a single GPR from string and checks inc indicator (e.g "x5" or "x5++")"""
    inc = False
    if len(asm_str.split()) > 1:
        raise SyntaxError('Unexpected separator in reg reference')
    if not asm_str.lower().startswith('x'):
        raise SyntaxError('Missing \'x\' character at start of GPR reference')
    if asm_str.lower().endswith('++'):
        inc = True
        reg = asm_str[1:-2]
    else:
        reg = asm_str[1:]
    if not reg.isdigit():
        raise SyntaxError('GPR reference not a number')
    return int(reg), inc