[squeak-dev] The Trunk: Regex-Core-ct.79.mcz
commits at source.squeak.org
commits at source.squeak.org
Tue Oct 11 13:09:31 UTC 2022
Christoph Thiede uploaded a new version of Regex-Core to project The Trunk:
http://source.squeak.org/trunk/Regex-Core-ct.79.mcz
==================== Summary ====================
Name: Regex-Core-ct.79
Author: ct
Time: 11 October 2022, 3:09:29.215455 pm
UUID: b733e45e-0504-774d-967a-7e4c4bb892cd
Ancestors: Regex-Core-ct.78
Fixes regression in lookarounds with branches. See Regex-Tests-Core-ct.31.
=============== Diff against Regex-Core-ct.78 ===============
Item was changed:
----- Method: RxMatcher>>syntaxRegex: (in category 'double dispatch') -----
syntaxRegex: regexNode
"Double dispatch from the syntax tree.
Regex node is a chain of branches to be tried. Should compile this into a bundle of parallel branches, between two marker nodes."
| startNode endNode alternatives |
+ regexNode isCapturing
+ ifTrue: [
+ startNode := RxmMarker new index: self allocateMarker.
+ endNode := RxmMarker new index: self allocateMarker]
+ ifFalse: [
+ endNode := RxmLink new "A single endNode is required that all branches of the answer must point to for termination."].
- regexNode isCapturing ifFalse: [
- ^ regexNode branch dispatchTo: self].
- startNode := RxmMarker new index: self allocateMarker.
- endNode := RxmMarker new index: self allocateMarker.
-
regexNode key ifNotNil: [:key |
self registerMarkerKey: key from: startNode index to: endNode index].
alternatives := self hookBranchOf: regexNode onto: endNode.
+ startNode ifNil: [^ alternatives].
^ startNode
pointTailTo: alternatives;
yourself!
More information about the Squeak-dev
mailing list
|