<div dir="ltr"><br>I'm having trouble building a lens that creates branches with multiple keys inside. My configuration file has unique lines which dictate which tree and branch a value is to be associated with, but the lens configuration I've build insists on building a sequence where one is not desired.<br><br>I've seen where a single line in a configuration file can be built to create multiple keys in a branch.<br>test_logrotate.aug shows single line "create 0664 root utmp" converted to <br>{.../create/mode = 0664<br> .../create/owner = root<br> .../create/group = utmp<br>}<br><br>Is this same result possible if the configuration file contains the values across multiple lines ( sometimes seperated by other configuration values )?<br><br>I've built the following lens and test as an example to show my (currently unachieved ) desired results.<br><br>-- simpletestconf.aug --<br>module Simpletestconf =<br>        autoload xfm<br><br>        let attribute = [ key /key[1-3]/i . Sep.space . store /value[1-3]/i ]<br><br>        let testbranch =<br>                [ key /testbranch/i . Sep.space . attribute . Util.eol ]<br><br>        let lns = ( Util.comment | testbranch ) *<br><br>        let filter = incl "/etc/simpletest.conf"<br><br>        let xfm = transform lns filter<br><br>-- dist/tests/test_simpletestconf.aug --<br>module Test_simpletestconf =<br><br>let example = "testbranch key1 value1<br>testbranch key2 value2<br>testbranch key3 value3<br>"<br><br>test SimpletestConf.lns get example =<br>{ "testbranch"<br>        { "key1" = "value1" }<br>        { "key2" = "value2" }<br>        { "key3" = "value3" }<br>}<br><br><br>Running augparse tests/test_simpletestconf.aug gives :<br>Test failure:tests/test_simpletestconf.aug:9.0-14.1:<br> Expected:<br>{<br>  { "testbranch"<br>    { "key1" = "value1" }<br>    { "key2" = "value2" }<br>    { "key3" = "value3" }<br>  }<br>}<br><br> Actual:<br>{<br>  { "testbranch"<br>    { "key1" = "value1" }<br>  }<br>  { "testbranch"<br>    { "key2" = "value2" }<br>  }<br>  { "testbranch"<br>    { "key3" = "value3" }<br>  }<br>}<br><br>Syntax error in lens definition<br>Failed to load tests/test_simpletestconf.aug<br><br><br>Am I overlooking something really simple, or am what I'm attempting not possible?<br><br>Sincerely<br>-Joe<br></div>