[augeas-devel] [Augeas] #253: Match oddities in recursive lens

Augeas trac at fedorahosted.org
Fri Nov 23 22:09:02 UTC 2012


#253: Match oddities in recursive lens
----------------------+--------------------
  Reporter:  raphink  |      Owner:  lutter
      Type:  defect   |     Status:  new
  Priority:  major    |  Milestone:  next
 Component:  Augeas   |    Version:  devel
Resolution:           |   Keywords:
Blocked By:           |   Blocking:
----------------------+--------------------

Comment (by fgiraldeau):

 I removed the dependency on Utils to make regexp simpler:

 {{{
 module Bug253 =

 let dels (s:string) = del s s
 let leaf = [ key "C" ]
 let empty = [ dels "X" ]

 let rec middle = [ key "B" . (middle|leaf) ]
 let top = [ key "A" . middle ]?
 let lns = empty* . top . empty*

 let _ = print_endline (lens_format_atype lns)
 let _ = print_regexp (lens_atype lns)
 let _ = print_endline ""

 test lns get "XXABBCXX" =
   {  }
   {  }
   { "A"
     { "B"
       { "B"
         { "C" }
       }
     }
   }
   {  }
   {  }

 }}}

 Attached is the png of the lens hierarchy. Is it normal that the atype
 from the concat is not propagated to the recursive subtree?

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




More information about the augeas-devel mailing list