<div dir="ltr"><div><div>Hi Patrick,<br></div>IMO copy should copy deep enough without the need to invoke veryDeepCopy.<br></div>Wouldn't it be a missing postCopy in RxmLookahead?<br><br>postCopy<br> super postCopy.<br> lookahead := lookahead copy<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-19 20:49 GMT+02:00 <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Patrick Rein uploaded a new version of Regex-Core to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/Regex-Core-pre.51.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk/Regex-Core-pre.51.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Regex-Core-pre.51<br>
Author: pre<br>
Time: 19 May 2016, 8:49:05.994548 pm<br>
UUID: 49e3e29a-cf96-4f42-a8f1-4af75dbb9bca<br>
Ancestors: Regex-Core-ul.50<br>
<br>
Fixes an erroring test of RxMatcher by replacing a copy with a veryDeepCopy to sustain the integrity of the RxmLink tree.<br>
<br>
=============== Diff against Regex-Core-ul.50 ===============<br>
<br>
Item was changed:<br>
----- Method: RxMatcher>>makeQuantified:min:max: (in category 'private') -----<br>
makeQuantified: anRxmLink min: min max: max<br>
"Perform recursive poor-man's transformation of the {<min>,<max>} quantifiers."<br>
| aMatcher |<br>
<br>
"<atom>{,<max>} ==> (<atom>{1,<max>})?"<br>
min = 0 ifTrue: [<br>
^ self makeOptional: (self makeQuantified: anRxmLink min: 1 max: max) ].<br>
<br>
"<atom>{<min>,} ==> <atom>{<min>-1, <min>-1}<atom>+"<br>
max ifNil: [<br>
+ ^ (self makeQuantified: anRxmLink min: 1 max: min-1) pointTailTo: (self makePlus: anRxmLink veryDeepCopy) ].<br>
- ^ (self makeQuantified: anRxmLink min: 1 max: min-1) pointTailTo: (self makePlus: anRxmLink copy) ].<br>
<br>
"<atom>{<max>,<max>} ==> <atom><atom> ... <atom>"<br>
min = max<br>
ifTrue: [<br>
+ aMatcher := anRxmLink veryDeepCopy.<br>
+ (min-1) timesRepeat: [ aMatcher pointTailTo: anRxmLink veryDeepCopy ].<br>
- aMatcher := anRxmLink copy.<br>
- (min-1) timesRepeat: [ aMatcher pointTailTo: anRxmLink copy ].<br>
^ aMatcher ].<br>
<br>
"<atom>{<min>,<max>} ==> <atom>{<min>,<min>}(<atom>{1,<max>-1})?"<br>
+ aMatcher := self makeOptional: anRxmLink veryDeepCopy.<br>
- aMatcher := self makeOptional: anRxmLink copy.<br>
(max - min - 1) timesRepeat: [<br>
+ aMatcher := self makeOptional: (anRxmLink veryDeepCopy pointTailTo: aMatcher) ].<br>
- aMatcher := self makeOptional: (anRxmLink copy pointTailTo: aMatcher) ].<br>
^ (self makeQuantified: anRxmLink min: min max: min) pointTailTo: aMatcher!<br>
<br>
<br>
</blockquote></div><br></div>