On Mon, 2011-02-14 at 16:17 +0100, Raphaël Pinson wrote:
> The numbers are all mixed up! Why is that happening?

When using recursive lenses, Augeas uses a context-free parser. The
first step in parsing is to construct a parse tree, the second step
consists of traversing the parse tree. Leaves in the parse tree
correspond to the non-recursive parts of your lens, for example 'value'
and 'counter "foo"'

The traversal of the parse tree does not visit leaves in strict
left-to-right order - in fact, the traversal is mostly right-to-left.
That explains why you see nodes in reverse order; for the 'jumbled'
sequence 3, 1, 2 you'd have to look at the actual parse tree.

In a nutshell: seq/counter don't really work with recursive lenses.
Fixing that would be a serious amount of work since it would affect the
whole recursive lens machinery.

David


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

Reply via email to