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

Re: [augeas-devel] Help regarding union.put overlap with INI-like format

On Wed, Nov 28, 2018 at 12:02 PM Pino Toscano <ptoscano redhat com> wrote:
On Wednesday, 28 November 2018 10:06:18 CET Raphaël Pinson wrote:
> Your example does not correspond to
>     (entry | record)*
> Rather, it corresponds to
>     entry* . record*
> since entries inside records are not independent.
> Also, you're missing comment support:
>     (comment | entry)* . record*

Hmm most probably I did not explain correctly: [end] is not the start
of a new group called "end", but it's the closing tag for a group.

Yes, that was quite clear.

So back to my example:

| foo=var
| [group1]
| var=value
| [end]
| foo2=var2
| [group2]
| var=value
| [end]

there are:
- a un-grouped entry "foo" with value "var"

which is mapped by "entry"
- a group "group1" with a "var" entry
- a un-grouped entry "foo2" with value "var2"

Ah, I did not catch that! So indeed, you need a mix of entries and records, but then you will have to make sure they don't collide in their definitions.

I've seen some horrible config formats when writing Augeas lenses, but there's still some… unexpected surprises…

Raphaël Pinson
Infrastructure Developer & Training Leader
+41 21 619 10 65

Camptocamp SA
EPFL Innovation Park, Bât A
1015 Lausanne

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