Hi Serge,<br><br><br>Great job! I've left some comments on github directly.<br><br><br>Regards,<br><br>Raphaël<br><br><br><div class="gmail_quote">On Tue, Mar 5, 2013 at 7:28 PM, Serge Smetana <span dir="ltr"><<a href="mailto:serge.smetana@gmail.com" target="_blank">serge.smetana@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I'm trying to create lens for Dovecot config.<br>
I'm already have working lens here:<br>
<a href="https://github.com/smetana/augeas/commit/0cbd6b88e0f1bf2e281fa3ea16803abbf8b3d770" target="_blank">https://github.com/smetana/augeas/commit/0cbd6b88e0f1bf2e281fa3ea16803abbf8b3d770</a><br>
<br>
But it is too "tight" because of the fixed list of keywords for the entries.<br>
Dovecot supports blocks and nested blocks like<br>
<br>
service auth {<br>
  unix_listener auth-userdb {<br>
     ...<br>
  }<br>
}<br>
<br>
and if I create wildcarded lens for simple entry<br>
<br>
   let entry = [ indent . key Rx.word. eq . (store value)? . eol ]<br>
<br>
I am unable to create lens for the block<br>
<br>
   let block_names = ("protocol" | "service" | "plugin" | "namespace" | "map" )<br>
   let block =<br>
       [ indent . key block_names . block_args? . block_open . eol<br>
       . (entry | empty | comment)*<br>
       . indent . block_close . eol ]<br>
<br>
I end up with exception: overlapping lenses in tree union.put<br>
    Example matched by both:  { "protocol" }<br>
<br>
Is there any way to define possible keys as something like a<br>
subsctraction (Rx.word - block_names)<br>
meaning "match anything but not /protocol|service|map/"?<br>
<br>
Thank you!<br>
Great job!<br>
<br>
Serge<br>
<br>
_______________________________________________<br>
augeas-devel mailing list<br>
<a href="mailto:augeas-devel@redhat.com">augeas-devel@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/augeas-devel" target="_blank">https://www.redhat.com/mailman/listinfo/augeas-devel</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Raphaël Pinson<br>Administrateur Systèmes & Réseaux<br>
Camptocamp France<br>
Savoie Technolac<br>
BP 352<br>
48, avenue du Lac du Bourget<br>
73372 Le Bourget du Lac, Cedex<br>
<a href="http://www.camptocamp.com" target="_blank">www.camptocamp.com</a><br>