[squeak-dev] The Trunk: Regex-Core-ct.60.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jul 8 06:25:00 UTC 2021


Marcel Taeumel uploaded a new version of Regex-Core to project The Trunk:
http://source.squeak.org/trunk/Regex-Core-ct.60.mcz

==================== Summary ====================

Name: Regex-Core-ct.60
Author: ct
Time: 8 July 2021, 12:56:00.161695 am
UUID: 6ab872b9-268c-854c-96a3-9d743c137f20
Ancestors: Regex-Core-ct.59

Fixes lookbehinds in particular optional/repeatable groups. See Regex-Tests-Core-ct.13.

Note that is only the tip of the iceberg; unfortunately, I discovered even more serious with lookbehind expresion in nullable groups (see Regex-Tests-Core.ct14). Nevertheless, I'd like to see this particular patch earlier in the Trunk as it at least fixes simple cases like in the test; there seem to be two independent defects in the implementation (one of which is fixed hereby).

=============== Diff against Regex-Core-ct.59 ===============

Item was changed:
  ----- Method: RxMatcher>>matchAgainstLookbehind:positive:nextLink: (in category 'matching') -----
  matchAgainstLookbehind: lookbehind positive: positive nextLink: anRmxLink
  
  	| position matchesLookbehind |
  	position := stream position.
  	matchesLookbehind := (position to: 0 by: -1)
  		anySatisfy: [:index |
  			stream position: index.
  			(lookbehind matchAgainst: self)
  				and: [stream position = position]].
+ 	stream position: position.
  	matchesLookbehind = positive
  		ifFalse: [^ false].
- 	stream position: position.
  	^ anRmxLink matchAgainst: self!



More information about the Squeak-dev mailing list