(p)
enum_item : IDENTIFIER '=' INTCONSTANT type_annotations
                 | IDENTIFIER type_annotations
                 |
enum_item : IDENTIFIER '=' INTCONSTANT type_annotations
                 | IDENTIFIER type_annotations
                 |
enum_item : IDENTIFIER = INTCONSTANT type_annotations | IDENTIFIER type_annotations |
def p_enum_item(p):
    '''enum_item : IDENTIFIER '=' INTCONSTANT type_annotations
                 | IDENTIFIER type_annotations
                 |'''
    if len(p) == 5:
        p[0] = [p[1], p[3]]
    elif len(p) == 3:
        p[0] = [p[1], None]
def p_enum_item ( p ) : if len ( p ) == 5 : p [ 0 ] = [ p [ 1 ] , p [ 3 ] ] elif len ( p ) == 3 : p [ 0 ] = [ p [ 1 ] , None ]