def p_enum_item(p):
 if (len(p) == 4):
  p[0] = [p[1], p[3]]
 elif (len(p) == 2):
  p[0] = [p[1], None]

def p_enum_item ( p ) : if ( len ( p ) == 4 ) : p [ 0 ] = [ p [ 1 ] , p [ 3 ] ] elif ( len ( p ) == 2 ) : p [ 0 ] = [ p [ 1 ] , None ]
enum_item : identifier = intconstant | identifier .