harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolay Kuznetsov (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-350) HARMONY-39 Regular expressions does not match backreferences during find.
Date Tue, 18 Apr 2006 13:45:18 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-350?page=all ]

Nikolay Kuznetsov updated HARMONY-350:
--------------------------------------

    Attachment: groups2.diff

Suggested patch fixes both HARMONY-350 issue and incorrect indices in PatternSyntaxException(see
HARMONY-352 for details). 

> HARMONY-39 Regular expressions does not match backreferences during find.
> -------------------------------------------------------------------------
>
>          Key: HARMONY-350
>          URL: http://issues.apache.org/jira/browse/HARMONY-350
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>  Environment: All
>     Reporter: Nikolay Kuznetsov
>     Assignee: Mikhail Loenko
>     Priority: Minor
>  Attachments: groups.diff, groups2.diff
>
> For the optimization purposes match and find methods of HARMONY-39 regex works differently.
One of the differences that cause some problems is that group boundaries are being set in
different time (onward, in case of match and on the way back in the case of find). Thus back
references "\1-9" won't work as expected in case of find method (because in case of find boundaries
are not yet set when back reference appears). The same problem appears if pattern contains
".*", where we try to simulate find and face the same problem.
> While fixing this problem the following simple issues was also found and fixed:
> - Empty constructs are not being processed correctly. The examples of this construct
are empty group(i.e. "()"), or empty alternation(i.e. "|") and combinations with embedded
flags, which do not match actual characters. In all cases HARMONY-39 engine throws PatternSyntaxException
instead of returning token representing empty construct.
> - Boundaries where embedded flags are in effect are not correctly processed:
>       - Whitespaces being ignored after group which nested comment flag;
>       - Global embedded flags do not mix with local once;
>       - Minus sign in embedded flags automatically removes case insensitive flag;
> The attached patch will address all mentioned above broblems.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message