bugText Extractor TXR - Bugs: bug #34641, List match is broken.

 
 

bug #34641: List match is broken.

Submitted by:  Kaz Kylheku <kkylheku>
Submitted on:  Tue 25 Oct 2011 02:01:42 AM UTC  
 
Category: NoneSeverity: 5 - Blocker
Item Group: CorrectnessStatus: Fixed
Privacy: PublicAssigned to: Kaz Kylheku <kkylheku>
Originator Name: Open/Closed: Closed
Component Version: 040Operating System: None
Fixed Release: 041Planned Release: None
Architecture: AllABI: All

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 25 Oct 2011 03:59:19 AM UTC, comment #1:

Fixed by this commit:

http://git.savannah.gnu.org/cgit/txr.git/commit/?id=91689fdfcb414a0ba1c486d3edd9fa087cc5b5c8

Kaz Kylheku <kkylheku>
Project AdministratorIn charge of this item.
Tue 25 Oct 2011 02:01:42 AM UTC, original submission:

When a variable which contains a list is matched against text, the following problem occurs.

The search_str_tree function iterates through the list and returns the first match which is found in the haystack. However, this match is not anchored to the starting position.

So for instance suppose the list is ("BC" "AB") and the text being matched is "ABC". The item "BC" matches but at the second position, and this is returned.

The calling wrongly concludes that there is no anchored match because although the result is positive, the returned position is not the start one.

A possible fix for this would be for search_str_tree to consider all matches, and return the one which at the leftmost position.

At the same time, if there are two or more candidate matches at the same leftmost position, it could choose the longest one, as posited in Bug #34629.

Kaz Kylheku <kkylheku>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kkylheku (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 26 Oct 2011 12:08:01 AM UTCkkylhekuOpen/ClosedOpen=>Closed
    Tue 25 Oct 2011 03:59:19 AM UTCkkylhekuStatusConfirmed=>Fixed
      Fixed ReleaseNone=>041

    Back to the top


    Powered by Savane 3.1-cleanup1