def t_BIN(t):
    """(%[01]+)|([01]+[bB])"""
    if t.value[0] == '%':
        t.value = t.value[1:]
    else:
        t.value = t.value[:-1]
    t.value = int(t.value, 2)
    t.type = 'NUMBER'
    return t
