<div dir="ltr">Hi all,<div><br></div><div>I'm trying to create a lens that accepts both quoted and unquoted values and is able to process trailing comments of both ; and #-style</div><div><br></div><div>Here is my lens (actually it is only a part of bigger pre-1.1 inifile-based one but this is enough to reproduce the issue): </div><div><br></div><div><div>module Testtest =</div><div><br></div><div><div>let to_comment_re = /[^";# \t\n][^;#\n]*[^;# \t\n]|[^";# \t\n]/</div><div>let sto_to_comment = Sep.opt_space . store to_comment_re</div><div><br></div><div>let quote = del "\"" "\""</div><div>let quoted_value_re = /[^"]*/</div><div>let quoted_value = Sep.opt_space . (quote . (store quoted_value_re) . quote)</div></div><div><br></div><div>let value = sto_to_comment | quoted_value<br></div></div><div><br></div><div><br></div><div>When I try to process it with augparse I see the following result:</div><div><br></div><div><div>$ augparse /tmp/testtest.aug</div><div>Syntax error in lens definition</div><div>/tmp/testtest.aug:10.0-.41:Failed to compile value</div><div>/tmp/testtest.aug:10.12-.41:exception: overlapping lenses in tree union.put</div><div>    Example matched by both:</div><div>    First lens: /tmp/testtest.aug:4.21-.56:</div><div>    Second lens: /tmp/testtest.aug:8.19-.76:</div></div><div><br></div><div>How should I deal with errors like that?</div><div>I understand that augeas can't figure out if it should quote my value or not when writing it but I have no ideas how to make it separate between them.</div><div>How do you usually handle the case like this one?</div><div><br></div><div><br></div><div>Thanks,</div><div>Timur</div></div>