deal with regex sets as combinable sets of numeric ranges

so this one is a bit experimental... it's much faster than my other pull request and the tests mostly pass

**new class**: I made a class that's for manipulating discontinuous ranges that allows for easy addition and subtraction of ranges.  I published it to npm and wrote some tests for it. it's called [DiscontinuousRanges] (https://github.com/dtudury/discontinuous-range) :)

**test**: there was a test to make sure the output of anyRandCharacter is returned by `/./`, but the new code doesn't use anyRandCharacter for that anymore ***so it failed***.  I couldn't find any other reference to anyRandCharacter so I removed it
Throw error? At lunch now
On Sep 16, 2014 12:13 PM, "Roly Fentanes" <notifications@github.com> wrote:

> In lib/randexp.js:
>
> > -          if (inClass(token.set, code, this.ignoreCase)) { continue; }
> > -          return c;
> > -        }
> > -
> > -      // Otherwise, pick a random token in the class set.
> > -      } else {
> > -        if (token.set.length) {
> > -          return gen.call(this,
> > -                 token.set[Math.floor(Math.random() * token.set.length)],
> > -                 groups, not);
> > -        } else {
> > -          return '';
> > -        }
> > -      }
> > +      var expanded_set = expand(token);
> > +      return char(expanded_set.index(Math.floor(Math.random() * expanded_set.length)), this.ignoreCase);
>
> also need to consider the case for which expanded_set.length will be 0
> like with the regexp [^\d\D]
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/fent/randexp.js/pull/13/files#r17623822>.
>