[augeas-devel] Matching key/value statement

Yclept Nemo orbisvicis at gmail.com
Fri Oct 30 01:24:50 UTC 2015


Without the typos:

How to unambiguously match:

    # spaces? key spaces? = spaces? value? spaces? comment?

where spaces is /[ \t]+/, "key" is the node key, "value" the node value,
and "comment" a child node?


These are all accurate but create ambiguities in the put direction:

    = (spaces | ((spaces? . value)? . (spaces? . comment)?))

    = spaces? . (value | comment | (value . spaces? . comment))?

    = (spaces? | (spaces? . value) | (spaces? . comment) | (spaces? . value
. spaces? . comment))

... whether or not the union branches occur in the lens or node level.

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


More information about the augeas-devel mailing list