anchor.diff:   * Returns a parser that accepts none of the specified characters.
    */
   Parser noneOf(String string, [String message]) {
  -  return new CharacterParser(
  -      _optimize(string.codeUnits.map((value) => new _CharacterRange(value))).not(),
  +  var ranges = string.codeUnits.map((value) => new _CharacterRange(value));
  +  return new CharacterParser(
  +      new _NotCharacterPredicate(_optimize(ranges)),
         message != null ? message : 'none of "$string" expected');
   }
   
  
positive.code:  */
  abstract class CharacterPredicate {
  
    const CharacterPredicate();
  
    /**
     * Tests if the character predicate is satisfied.
     */
    bool test(int value);
  
    /**
     * Negates this character predicate.
     */
    CharacterPredicate not() => new _NotCharacterPredicate(this);
  
    /**
     * Matches this character predicate or other.
     */
    CharacterPredicate or(CharacterPredicate other) => new _AltCharacterPredicate([this, other]);
  
  }
  
  class _NotCharacterPredicate extends CharacterPredicate {
  
    final CharacterPredicate _predicate;
  
    const _NotCharacterPredicate(this._predicate);
  
    @override
    bool test(int value) => !_predicate.test(value);
  
    @override
    CharacterPredicate not() => _predicate;
  
  }
  
  class _AltCharacterPredicate extends CharacterPredicate {
  
    final List<CharacterPredicate> _predicates;
  
    const _AltCharacterPredicate(this._predicates);
  
    @override
    bool test(int value) {
      for (var predicate in _predicates) {
        if (predicate.test(value)) {
          return true;
        }
  
negative.code:   var positive = multiple.or(single).plus()
        .map((each) => _optimize(each));
    return char('^').optional().seq(positive)
        .map((each) => each[0] == null ? each[1] : new _NotCharacterPredicate(each[1]));
  }
  
  final _patternParser = _createPatternParser();
  