[augeas-devel] Inexpressible Language

Yclept Nemo orbisvicis at gmail.com
Sun Jun 29 19:45:53 UTC 2014


> but it produces an error I don't understand: ... Example matched by
both:  {  }

Ah - ambiguous in the tree->string direction. Is it possible to solve this
without generating artificial labels ("#comment", "#comment1") ?

    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 entry               =
        let not_setting     = Rx.space_in - ( lens_ctype setting . /.*/ )

            (* doesn't start with a space   - starts with setting
- doesn't match the empty string *)
        in  [ setting . ( [ label "#comment" . Sep.opt_space . store
Rx.space_in . Sep.opt_space ] | Sep.opt_space ) ] |

            (* doesn't start with a space   - doesn't start with setting
- doesn't match the empty string *)
            [ label "#comment" . store not_setting . del /[ \t]*/ "" ] |

            (* starts with a space
- doesn't match the empty string *)
            [ label "#comment2" . del /[ \t]+/ " " . store Rx.space_in .
Sep.opt_space ] |

            (*
- matches the empty string *)
            [ del // "" ]
    let line                = entry . Util.del_str "\n"
    let lns                 = line *

Sincerely,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20140629/0c99d74d/attachment.htm>


More information about the augeas-devel mailing list