def but_not_one_of(self, nt, exclusion_list): exclusion_list = [exclusion for _, exclusion in exclusion_list] return grammar.Exclude(nt, exclusion_list)
def but_not(self, nt, exclusion): _, exclusion = exclusion return grammar.Exclude(nt, [exclusion])