Last change
on this file since 1667 was 1337, checked in by Bruno Cornec, 13 years ago |
Adds Augeas pb backend example
|
-
Property svn:executable
set to
*
|
File size:
563 bytes
|
Line | |
---|
1 | module PB =
|
---|
2 | autoload xfm
|
---|
3 |
|
---|
4 | let word = Rx.word
|
---|
5 | let ws = Util.del_ws_tab
|
---|
6 | let eol = Util.eol
|
---|
7 | let comment = Util.comment
|
---|
8 | let empty = Util.empty
|
---|
9 | let eq = del /[ \t]*=[ \t]*/ "="
|
---|
10 | let comma = del /[ \t]*,[ \t]*/ ","
|
---|
11 | let sto_value = [ label "value" . store /[^ \t\n,]+/ ]
|
---|
12 |
|
---|
13 | let record = [ key word . ws . store word
|
---|
14 | . eq
|
---|
15 | . Build.opt_list sto_value comma
|
---|
16 | . (eol|comment)
|
---|
17 | ]
|
---|
18 |
|
---|
19 | let lns = ( record | comment | empty )*
|
---|
20 |
|
---|
21 | let xfm = transform lns (incl "/etc/toto")
|
---|
22 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.