Thanks,

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:

    let option              = key /[A-Z_]+/
    let value               = Sep.colon . Sep.opt_space . store /[^]
\t\n:]+/ . Sep.opt_space
    let values              = counter "value" . [ seq "value" . value ] +
    let setting             = [ Util.del_str "[" . option . values .
Util.del_str "]" ]
    let comment (r:regexp)  = del r ""
    let entry               =
        let not_setting = /.*/ - ( lens_ctype setting . /.*/ )
        in  setting . comment /.*/ | comment not_setting
    let line                = entry . Util.del_str "\n"
    let lns                 = line *

    given the input [1]

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?

Anyway I'm grateful for your help and I apologize for responding so late
and not having provided a proper example.

Sincerely,
_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to