在Augeas中使用'\'表示多行值

我最近在Augeas组装了一个镜头,现在它不能按照要求工作。

我的文件包含几个使用以下语法的引用:

Value1 = KEY 32 OR\ KEY 33 OR\ .... 

我如何表示反斜线换行符组合并将其视为同一个值的一部分?

编辑 – 我运行的版本.10.0

 ... let comment = IniFile.comment IniFile.comment_re IniFile.comment_default let sep = IniFile.sep IniFile.sep_re IniFile.sep_default let empty = IniFile.empty let setting = IniFile.entry_re let title = IniFile.indented_title_label "target" IniFile.record_label_re let entry = [ key IniFile.entry_re . sep . IniFile.sto_to_comment . (comment|IniFile.eol) ] | [ key IniFile.entry_re . store // . (comment|IniFile.eol) ] | [ key /\![A-Za-z][A-Za-z0-9\._-]+/ . del / / " " . store /\/[A-Za-z0-9\.\/_-]+/ . (comment|IniFile.eol) ] | comment let record = IniFile.record title entry let record_anon = [ label ".anon" . ( entry | empty )+ ] let lns = record_anon | record* 

您的镜头不是写入多行条目。 如果你想支持多行条目,你需要使用IniFile.entry_multiline

 let entry_multiline (kw:regexp) (sep:lens) (comment:lens) = [ key kw . sep . sto_multiline? . (comment|eol) ] | comment 

但是,这个定义并不认可\作为续行符号,因为我从来没有见过IniFile在今天使用它。 \通常用作各种键/值格式的连续符号,IniFiles通常简单地使用缩进来确定一行是否是前一行的延续。

作为一个说明,我不认为你的lns的定义真的是你想要的:

 let lns = record_anon | record* 

意思是“一个record_anon ,后面是零,一个或多个record s”,而我想你可能是指“零个,一个或多个record_anon ,后面是零,一个或多个record s”,即:

 let lns = record_anon* . record*