These changes fix QT4 test case analyzeString-017. This requires calculation of the parent group of a regex group, for being able to decide where to put an empty match for some group within the result of fn:analyze-string.
The parent group could have been calculated while parsing the regex, however when using option j, this does not take place. So it was implemented by a separate scan of the Java regex. This however is only done when a group matches the empty string while processing the result of fn:analyze-string.
Member groups of RegExp.RegExpr has been dropped, because the same information is available from Matcher.groupCount. This change also enables proper handling of group references in fn:replace when using the j option (groups was not set in this case).
These changes fix QT4 test case
analyzeString-017
. This requires calculation of the parent group of a regex group, for being able to decide where to put an empty match for some group within the result offn:analyze-string
.The parent group could have been calculated while parsing the regex, however when using option
j
, this does not take place. So it was implemented by a separate scan of the Java regex. This however is only done when a group matches the empty string while processing the result offn:analyze-string
.Member
groups
ofRegExp.RegExpr
has been dropped, because the same information is available fromMatcher.groupCount
. This change also enables proper handling of group references infn:replace
when using thej
option (groups
was not set in this case).