On Fri, Jul 11, 2008 at 12:41 AM, David Lutterkort <[EMAIL PROTECTED]> wrote:
> On Thu, 2008-07-10 at 12:33 +0200, Raphaël Pinson wrote: > > I'm trying to work on the following file, but I get : > > > > bbwarnrules.aug:45.4-.43:Failed to compile lns > > bbwarnrules.aug:45.14-.43:exception: ambiguous tree iteration > > 'host/host/' can be split into > > 'host/|=|host/' > > > > and > > 'host/host/|=|' > > > > Iterated lens: bbwarnrules.aug:45.16-.40 > > > > bbwarnrules.aug: error: Loading failed > > The error message says 'If I see a tree that has two "host" nodes next > to each other, I get confused' (note that it says 'tree iteration') - > this error message is about the 'put' direction from tree back to the > file. > > > let record = notmark? . > > host . ( sep_spc . host )* . > > semi_col . > > ([ label "exhosts" . value_to_semi_col ])? . > > semi_col . > > ([ label "services" . value_to_semi_col ])? . > > semi_col . > > ([ label "exservices" . value_to_semi_col ])? . > > semi_col . > > ([ label "day" . value_to_semi_col ])? . > > semi_col . > > ([ label "time" . value_to_semi_col ])? . > > semi_col . > > ([ label "recipients" . value_to_eol ])? > > . eol_no_spc > > > > (* Define lens *) > > > > let lns = ( comment | empty | record )* > > The problem is that a tree with two adjacent host nodes can either be > processed as one 'record' that has two hosts or as two 'record' > instances with one host each, i.e. in the first case the correct output > would be > host1 host2 > whereas in the second, the correct output would be > host1 > host2 > (since record ends with a eol_no_spc) What I don't really get is that I think I specify a record as something that looks like ! myhost;a;b;c;d;e;f or myhost;a;b;c;d;e;f as in, there _must_ be semi-colons on each record line, so a line like 'host/host/' is just not possible in this lens. Am I missing something to specify this ? Raphaël
_______________________________________________ augeas-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/augeas-devel
