identlist : IDENT
                  | NOT IDENT
                  | IDENT AND identlist
                  | NOT IDENT AND identlist

def p_identlist(self, t):
    '''identlist : IDENT
                  | NOT IDENT
                  | IDENT AND identlist
                  | NOT IDENT AND identlist              
                  '''
    if len(t)==5 : 
      #print(t[1],t[2],t[3],t[4])
      t[0] = t[1]+t[2]+t[3]+t[4]
    elif len(t)==4 : 
      #print(t[1],t[2],t[3])
      t[0] = t[1]+t[2]+t[3]
    elif len(t)==3 : 
      #print(t[1],t[2])
      t[0] = t[1]+t[2]
    elif len(t)==2 :
      #print(t[0],t[1])
      t[0]=t[1]
    else:
      print("Syntax error at '",str(t),"'")