def t_NUMBER(t):
    r'\d+'
    try:
        t.value = int(t.value)
    except ValueError:
        print("Integer value too large %d", t.value)
        t.value = 0
    return t
def t_NUMBER ( t ) : try : t . value = int ( t . value ) except ValueError : print ( "Integer value too large %d" , t . value ) t . value = 0 return t
r'\d+