classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] RFC: Possessive quantifiers in gnu.regexp (PR libgcj/20435)


From: Ziga Mahkovec
Subject: [cp-patches] RFC: Possessive quantifiers in gnu.regexp (PR libgcj/20435)
Date: Sat, 28 May 2005 20:10:22 +0200

This patch adds possessive quantifier support to gnu.regexp.  Possessive
quantifiers[1] (?+, *+, ++, {n,m}+) were introduced in Java 1.4.  The
patch adds the capability to JAVA_1_4 syntax and also replaces PERL5
syntax as the default java.util.regex.Pattern syntax (note that
possessive quantifiers are currently the only difference between the two
syntaxes).

The lack of possessive quantifiers was reported[2] as blojsom's failure
to start up.  New Mauve test cases[3] were allso written for these
regular expressions.

[1] http://java.sun.com/docs/books/tutorial/extra/regex/quant.html
[2] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20435
[3] http://sources.redhat.com/ml/mauve-patches/2005/msg00049.html

-- 
Ziga


2005-05-28  Ziga Mahkovec  <address@hidden>

        PR libgcj/20435:
        * gnu/regexp/RESyntax.java (RE_POSSESSIVE_OPS): New field.
        (static): Add possessive matching to JAVA_1_4 syntax.
        * gnu/regexp/RETokenRepeated.java (possessive): New field.
        (makePossessive, isPossessive): New methods.
        (match): Don't back off during possessive matching.
        * gnu/regexp/RE.java (initalize): Accept possessive quantifier.
        * java/util/regex/Pattern.java (constructor): Switch syntax from PERL5
        to JAVA_1_4.

Attachment: regex-possessive.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]