You're using a lot of /.*/, which is rarely a good idea.

Could you provide an example of a string that does not parse with the lens
I provided, and the tree you expect the lens should produce from it?


Regards,

Raphaël



On Sun, Jun 29, 2014 at 8:37 AM, Yclept Nemo <[email protected]> wrote:

> 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,
>



-- 
Raphaël Pinson
Infrastructure Developer & Trainer
+33 479 26 57 93
+33 781 90 00 79

Camptocamp France
Savoie Technolac
BP 352
48, avenue du Lac du Bourget
73372 Le Bourget du Lac, Cedex
www.camptocamp.com
_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to