final RegExp parseComplExp() throws IllegalArgumentException { if (check(COMPLEMENT) && match('~')) return makeComplement(parseComplExp()); else return parseCharClassExp(); }
final RegExp parseCharClassExp() throws IllegalArgumentException { if (match('[')) { boolean negate = false; if (match('^')) negate = true; RegExp e = parseCharClasses(); if (negate) e = makeIntersection(makeAnyChar(), makeComplement(e)); if (!match(']')) throw new IllegalArgumentException( "expected ']' at position " + pos); return e; } else return parseSimpleExp(); }
final RegExp parseComplExp() throws IllegalArgumentException { if (check(COMPLEMENT) && match('~')) return makeComplement(parseComplExp()); else return parseCharClassExp(); }
final RegExp parseComplExp() throws IllegalArgumentException { if (check(COMPLEMENT) && match('~')) return makeComplement(parseComplExp()); else return parseCharClassExp(); }
final RegExp parseComplExp() throws IllegalArgumentException { if (check(COMPLEMENT) && match('~')) return makeComplement(parseComplExp()); else return parseCharClassExp(); }
final RegExp parseCharClassExp() throws IllegalArgumentException { if (match('[')) { boolean negate = false; if (match('^')) negate = true; RegExp e = parseCharClasses(); if (negate) e = makeIntersection(makeAnyChar(), makeComplement(e)); if (!match(']')) throw new IllegalArgumentException( "expected ']' at position " + pos); return e; } else return parseSimpleExp(); }
final RegExp parseCharClassExp() throws IllegalArgumentException { if (match('[')) { boolean negate = false; if (match('^')) negate = true; RegExp e = parseCharClasses(); if (negate) e = makeIntersection(makeAnyChar(), makeComplement(e)); if (!match(']')) throw new IllegalArgumentException( "expected ']' at position " + pos); return e; } else return parseSimpleExp(); }
final RegExp parseCharClassExp() throws IllegalArgumentException { if (match('[')) { boolean negate = false; if (match('^')) negate = true; RegExp e = parseCharClasses(); if (negate) e = makeIntersection(makeAnyChar(), makeComplement(e)); if (!match(']')) throw new IllegalArgumentException( "expected ']' at position " + pos); return e; } else return parseSimpleExp(); }