This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author terry.reedy
Recipients Alexey Burdin, Lewis Ball, taleinat, terry.reedy
Date 2020-07-26.04:43:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595738633.3.0.343910831514.issue41388@roundup.psfhosted.org>
In-reply-to
Content
As I at least hinted above, I would rather add the missing line starts than delete more.  I am quite sure that their absence degrades overall performance in some sense.  A much bigger match problem that this one is that ^0 always half fails when the cursor is not on the line with the closer.  See #21756, which already has a patch, though not one I was completely happy with last time I looked.

I cannot help but think that a proper solution might fix both issues.

I once wrote a fence matcher in C, initially for C, based on a deterministic finite state machine but with a push-down stack so it could match indefinite nesting.  I am thinking that I should try to rewrite in python and see if it will solve both issues.  Find good parse start is not really the right tool, because what we want to do with ^0 is to move both back and forward, find the first unmatched fence in each direction, and flash them, and add a beep if unmatched.  BOF and EOF (begin/end of file) are the backup fences.

Another possible solution might be to use a depleted _synchre for matching and an augmented one for any other use where that is better.
History
Date User Action Args
2020-07-26 04:43:53terry.reedysetrecipients: + terry.reedy, taleinat, Alexey Burdin, Lewis Ball
2020-07-26 04:43:53terry.reedysetmessageid: <1595738633.3.0.343910831514.issue41388@roundup.psfhosted.org>
2020-07-26 04:43:53terry.reedylinkissue41388 messages
2020-07-26 04:43:53terry.reedycreate