<div dir="ltr">Thanks,<br><br>Now I'm using your example as guidance since there was one additional restriction I failed to demonstrate. Unfortunately my schema generates an "ambiguous tree iteration" exception:<br>
<br>    let option              = key /[A-Z_]+/<br>    let value               = Sep.colon . Sep.opt_space . store /[^] \t\n:]+/ . Sep.opt_space<br>    let values              = counter "value" . [ seq "value" . value ] +<br>
    let setting             = [ Util.del_str "[" . option . values . Util.del_str "]" ]<br>    let comment (r:regexp)  = del r ""<br>    let entry               = <br>        let not_setting = /.*/ - ( lens_ctype setting . /.*/ )<br>
        in  setting . comment /.*/ | comment not_setting<br>    let line                = entry . Util.del_str "\n"<br>    let lns                 = line *<br><br>    given the input [1]<br><br>If I understand regex subtraction correctly, "re1 - re2" is interpreted as the set of all possible matches generated by re2 subtracted from the set of all possible matches generated by re1. However this generates massively long and complex regexes, is this possibly the root of the problem?<br>
<br>Anyway I'm grateful for your help and I apologize for responding so late and not having provided a proper example.<br><br>Sincerely,<br></div>