[augeas-devel] Recursive lens matching error

Francis Giraldeau francis.giraldeau at usherbrooke.ca
Wed Jun 23 18:47:25 UTC 2010


Hi, 

I'm trying to make working dhcpd.conf lens, and having hard time to
figure how to handle white space correctly. The format for sections is
simple, they have a name and content included in braces. 

I got a strange error. The parsing fail even if all the input is
processed in the case of a recursive lens. The module is attached to
this mail. It also shows that it doesn't produce the error with the
regular lens. 

Maybe I do something wrong, or is it a bug? 

Cheer, 

Francis
-------------- next part --------------
module Ws = 

let dels (s:string) = del s s

let ws = del /[w]*/ ""
let abody = del /[wa]*/ ""
 
let sec (body:lens) = [ ws . dels "{" . body . dels "}"]*
let sec_simple = sec abody
let lns1 = sec_simple . ws

let rec sec_complete = sec sec_complete
let lns2 = sec_complete . ws

let input1 = "w{waw}ww{waw}w"
let input2 = "w{}ww{}w"

test lns1 get input2 = ?
test lns2 get input2 = ?


More information about the augeas-devel mailing list