Lines Matching refs:set
486 # check if the branch can be replaced by a character set
487 set = []
493 set.append((op, av))
495 set.extend(av)
499 # we can store this as a character set instead of a
501 subpattern.append((IN, _uniq(set)))
547 # character set
548 set = []
549 setappend = set.append
555 'Possible nested set at position %d' % source.tell(),
563 raise source.error("unterminated character set",
565 if this == "]" and set:
570 if set and this in '-&~|' and source.next == this:
573 'Possible set %s at position %d' % (
586 raise source.error("unterminated character set",
600 'Possible set difference at position %d' % (
619 set = _uniq(set)
620 # XXX: <fl> should move set optimization to compiler!
621 if _len(set) == 1 and set[0][0] is LITERAL:
624 subpatternappend((NOT_LITERAL, set[0][1]))
626 subpatternappend(set[0])
629 set.insert(0, (NEGATE, None))
632 subpatternappend((IN, set))