[Sorry about the bollocks subject; not sure even what the right keywords
here are]
I'm trying to write a lens (for syslinux boot config files, if it matters)
and I want to take option keys which could be case-insensitive and turning
them into consistent keys in the tree. I'm trying to do this:
module Testparse =
autoload xfm
let option = [ (del /[Ff][Oo][Oo]/ "foo" . label "foo")
|(del /[Bb][Aa][Rr]/ "bar" . label "bar")
. del /[ \t]+/ " "
. store /[^ \t].*/
. del /\n/ "\n"
]
let lns = option+
let filter = incl "/tmp/minparse"
let xfm = transform lns filter
But I'm getting a rather arse error message:
../testparse.aug:4.1-9.15:Failed to compile option
../testparse.aug:4.16-8.30:exception: overlapping lenses in tree union.put
Example matched by both: ''
First lens: ../testparse.aug:4.16-.55
Second lens: ../testparse.aug:5.15-8.30
To me, this seems totally wrong -- how could either of those match an empty
string, let alone both? None of the results found by Google seem to match
up with what I'm doing. Any pointers on what I'm doing wrong?
- Matt
_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel