classpath-patches
[Top][All Lists]
Advanced

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

Re: [cp-patches] RFC: gnu.regexp fix to allow "([(])"


From: Ito Kazumitsu
Subject: Re: [cp-patches] RFC: gnu.regexp fix to allow "([(])"
Date: Thu, 19 Jan 2006 01:12:23 +0900 (JST)

Hi Mark,

I am sorry, I missed your mail.

From: Mark Wielaard <address@hidden>
Subject: Re: [cp-patches] RFC: gnu.regexp fix to allow "([(])"
Date: Fri, 13 Jan 2006 10:46:19 +0100

> On Wed, 2006-01-11 at 01:08 +0900, Ito Kazumitsu wrote:
> >       Fixes bug #22802
> >       * gnu/regexp/RE.java(initialize): Fixed the parsing of
> >       character classes within a subexpression.
> 
> This introduces a few Mauve failures:
> 
> +FAIL: gnu.testlet.java.util.regex.CharacterClasses: testMatchComplete
> '[[]' flags 0 (number 5)
> +FAIL: gnu.testlet.java.util.regex.CharacterClasses: testComplete '[[]'
> flags 0 (reset) (number 5)
> +FAIL: gnu.testlet.java.util.regex.CharacterClasses: testMatchComplete
> '[^[]' flags 0 (number 5)
> +FAIL: gnu.testlet.java.util.regex.CharacterClasses: testComplete '[^[]'
> flags 0 (reset) (number 5)
> 
> Could you take a look at those?

Well, perl accepts "[[]" and "[^[]" as valid regular expressions.
But Sun's JDK does not.

java.util.regex.PatternSyntaxException: Unclosed character class near index 4
([[])
    ^
Sun's JDK accepts such expressions as "[abc[xyz]]" and "[a-z&&[^p-r]]",
and as a result of supporting such nested character classes, traditional
expression "[[]" and "[^]]" are no longer supported, I guess.
 
If such is the case with Sun's JDK, isn't it OK that those Mauve tests
fail?




reply via email to

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