[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [augeas-devel] Matching key/value statement



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,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]