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

[augeas-devel] Example matched by two lenses: <nothing>

Hello Augeas experts,

attached you can find a custom developed lens definition for Augeas together with a test for it. The problem with this lens is, that augparse complains about overlapping lenses, but doesn't show me a possible match for them. I cannot understand this error, even more so that all the real-world examples I came up with so far are successfully parsed without any issues.

[root some_host ~]# augparse /usr/share/augeas/lenses/dist/gridmapfile.aug
Syntax error in lens definition
/usr/share/augeas/lenses/dist/gridmapfile.aug:16.2-23.71:Failed to compile mapping
/usr/share/augeas/lenses/dist/gridmapfile.aug:19.26-.38:exception: overlapping lenses in tree union.put
    Example matched by both:
    First lens: /usr/share/augeas/lenses/dist/gridmapfile.aug:17.15-.29:
    Second lens: /usr/share/augeas/lenses/dist/gridmapfile.aug:18.17-.49:

Can someone please explain to me why Augeas reports a syntax error? Since Augeas didn't use any quotation marks for its example, the possible match doesn't consist of white spaces exclusively. An empty line is not supposed to be matched by the lenses defined in line 17 or 18 either. In fact, the ctype regular expression of line 19, where the exception originated, looks like this:

/([^\t\n "]+|"[^\n"]*")/

So this matches anything but white space and quotation marks, or anything, possibly nothing, enclosed by quotations marks (excluding quotation marks and line breaks). I cannot think of any overlap here.

Thank you for your attention! Best regards,

PS: Yes, I know about the Quote module, that offers lenses for matching strings that are optionally enclosed in quotation marks. But the problem with those is, that it seems very difficult to build trees with them.

Karlsruher Institute of Technology (KIT)
Steinbuch Centre for Computing (SCC)

B. Sc. Xavier Mol
GridKa Storage Administrator and Support Manager

Hermann-von-Helmholtz-Platz 1
Geb. 449
76344 Eggenstein-Leopoldshafen
Phone: +49 721 608 23041
Email: xavier mol kit edu
KIT - University of the State of Baden-W├╝rttemberg and National Large-scale Research Center of the Helmholtz Association
"Since 2010, the KIT has been certified as a family-friendly university."

Attachment: gridmapfile.aug
Description: Binary data

Attachment: test_gridmapfile.aug
Description: Binary data

Attachment: smime.p7s
Description: S/MIME cryptographic signature

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