Bug 35270 - missing support for \p{javaJavaIdentifierPart} in regex implementation
Summary: missing support for \p{javaJavaIdentifierPart} in regex implementation
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: classpath (show other bugs)
Version: 0.96.1
: P3 normal
Target Milestone: 0.97
Assignee: Andrew John Hughes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-20 20:35 UTC by Michael Koch
Modified: 2008-02-21 12:57 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-02-21 11:55:57


Attachments
testcase (136 bytes, text/plain)
2008-02-20 20:37 UTC, Michael Koch
Details
More detailed testcase (186 bytes, text/x-java)
2008-02-21 12:56 UTC, Andrew John Hughes
Details
Patch (1007 bytes, patch)
2008-02-21 12:57 UTC, Andrew John Hughes
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Koch 2008-02-20 20:35:53 UTC
The gnu.regexp version included in GNU classpath misses the implementation of \p{javaJavaIdentifierPart}. This character class is used by some applications, e.g. jarjar (http://code.google.com/p/jarjar/). A simple testcase will be attached.
Comment 1 Michael Koch 2008-02-20 20:37:08 UTC
Created attachment 15188 [details]
testcase
Comment 2 Andrew John Hughes 2008-02-21 11:55:56 UTC
The problem is more general.  We don't handle this:

Categories that behave like the java.lang.Character boolean ismethodname methods (except for the deprecated ones) are available through the same \p{prop} syntax where the specified property has the name javamethodname.

at all.  I'll write a patch for this.
Comment 3 Andrew John Hughes 2008-02-21 12:56:09 UTC
CVSROOT:        /sources/classpath
Module name:    classpath
Changes by:     Andrew John Hughes <gnu_andrew> 08/02/21 12:55:12

Modified files:
       .              : ChangeLog
       gnu/java/util/regex: REException.java RETokenNamedProperty.java

Log message:
       2008-02-21  Andrew John Hughes  <gnu_andrew@member.fsf.org>

               * gnu/java/util/regex/REException.java:
               (REException(String,Throwable,int,int)): Added
               constructor which also includes the cause.
               * gnu/java/util/regex/RETokenNamedProperty.java:
               (getHandler(String)): Add support for \p{javaX}.
               (JavaCategoryHandler): New class.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.9518&r2=1.9519
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/util/regex/REException.java?cvsroot=classpath&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/java/util/regex/RETokenNamedProperty.java?cvsroot=classpath&r1=1.2&r2=1.3
Comment 4 Andrew John Hughes 2008-02-21 12:56:31 UTC
Created attachment 15192 [details]
More detailed testcase
Comment 5 Andrew John Hughes 2008-02-21 12:57:00 UTC
Created attachment 15193 [details]
Patch
Comment 6 Andrew John Hughes 2008-02-21 12:57:13 UTC
Fixed in CVS. Closing.