#147: Union of case-insensitive regexps breaks future instructions
----------------------+-----------------------------------------------------
  Reporter:  raphink  |       Owner:  lutter  
      Type:  defect   |      Status:  assigned
  Priority:  major    |   Milestone:  next    
 Component:  Augeas   |     Version:          
Resolution:           |    Keywords:          
----------------------+-----------------------------------------------------
Changes (by lutter):

  * status:  new => assigned

Comment:

 The problem has to do how mixed-case lenses are computed and that we
 depend on the structure of parentheses to extract submatches.

 To simplify the example in the bug, this lens also exhibits the problem:

 {{{
   let l = [ key /(a)|(b)/i . del "=" "=" . store /x/ ]
 }}}

 Since parts of l are case-insensitive, and others aren't, the case-
 insensitive part ('key /(a)|(b)/i') needs to be turned into a case-
 sensitive lens: key /([aA]|[bB])/ that can then be concatenated with the
 rest. Unfortunately, the process of turning a case-insensitive lens into a
 case-sensitive lens changes where parentheses appear, which leads to
 trouble when the overall regular expression is matched, and groups in that
 match are used to extract, e.g., the substring for the 'key' lens.

 There's a number of ways in which this could be fixed - not sure though
 which one I prefer.

-- 
Ticket URL: <https://fedorahosted.org/augeas/ticket/147#comment:3>
Augeas <http://augeas.net/>
a configuration API

_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to