private RegExp ParseCharClassExp() { if (this.Match('[')) { bool negate = false; if (this.Match('^')) { negate = true; } RegExp e = this.ParseCharClasses(); if (negate) { e = RegExp.MakeIntersection(RegExp.MakeAnyChar(), RegExp.MakeComplement(e)); } if (!this.Match(']')) { throw new ArgumentException("expected ']' at position " + this.pos); } return(e); } return(this.ParseSimpleExp()); }
private RegExp ParseInterExp() { RegExp e = this.ParseConcatExp(); if (this.Check(RegExpSyntaxOptions.Intersection) && this.Match('&')) { e = RegExp.MakeIntersection(e, this.ParseInterExp()); } return(e); }