harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Liang <richard.lian...@gmail.com>
Subject Re: [classlib] Requirement: Regex support for \p{javaDigit}
Date Thu, 29 Jun 2006 02:43:26 GMT
That's great! Nik. You're so helpful. Thanks a lot.  ;-)

Nikolay Kuznetsov wrote:
> Hello Richard,
> Thanks for pointing this out. While implementing java character
> classes I missed the fact that _all_ Character.isXXX methods except
> deprecated should have corresponding \\p{javaXXX} character class
> analogues. So the the answer to your question whether we should
> implement javaDigit char class is YES.
>
> I've opened an issue to support the rest of character classes:
> http://issues.apache.org/jira/browse/HARMONY-696
>
> Also, thanks a lot for your willing to add javaDigit class, but if you
> don't mind I would implement full range of {javaXXX} classes by myself
> just because it would be easier for me, as for an author :-).
> Hopefully, I'll be ready with this tomorrow.
>
> On 6/28/06, Richard Liang <richard.liangyx@gmail.com> wrote:
>> Hello All,
>>
>> I'm trying to implement java.util.Scanner.nextInt, which requires a
>> regular expression pattern to represent  "Integer". I find it's hard to
>> express /NonASCIIDigit /because now Harmony regex does not support
>> /NonASCIIDigit/.
>>
>> As our regex has supported "\p{javaLowerCase}     Equivalent to
>> java.lang.Character.isLowerCase()", to facilitate the development of
>> j.u.Scanner, shall we provide support for "\p{javaDigit}", which is
>> equivalent to java.lang.Character.isDigit()? I could provide patch for
>> this feature if there is no objection. Thanks lot.
>> *
>> *You may want to refer to the number syntax in java.util.Scanner Spec:*
>> */<QUOTE>
>> NonASCIIDigit  :: = A non-ASCII character c for which
>> Character.isDigit(c) returns true
>>
>> Non0Digit  ::= [1-Rmax] | NonASCIIDigit
>>
>> Digit  ::= [0-Rmax] | NonASCIIDigit
>>
>> GroupedNumeral  ::  = ( Non0Digit Digit? Digit? ( LocalGroupSeparator
>> Digit Digit Digit )+ )
>>
>> Numeral  ::= ( ( Digit+ )  |  GroupedNumeral )
>>
>> Integer  ::= ( [-+]? ( Numeral ) )  |  LocalPositivePrefix Numeral
>> LocalPositiveSuffix  |  LocalNegativePrefix Numeral LocalNegativeSuffix/
>> /</QUOTE>/
>>
>>
>> -- 
>> Richard Liang
>> China Software Development Lab, IBM
>>
>>
>>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>

-- 
Richard Liang
China Software Development Lab, IBM 



---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message