5 Author: Raphael Pinson <raphink@gmail.com>
8 This lens tries to keep as close as possible to `man 5 protocols` where possible.
11 This file is licenced under the LGPL v2+, like the rest of Augeas.
16 About: Configuration files
17 This lens applies to /etc/protocols. See <filter>.
20 The <Test_Protocols> file contains various examples and tests.
28 let protoname = /[^# \t\n]+/
32 let protocol = [ label "protocol" . store protoname ]
33 in let number = [ label "number" . store Rx.integer ]
34 in let alias = [ label "alias" . store protoname ]
35 in [ seq "protocol" . protocol
37 . (Sep.space . Build.opt_list alias Sep.space)?
38 . Util.comment_or_eol ]
42 let lns = (Util.empty | Util.comment | entry)*
44 (* Variable: filter *)
45 let filter = incl "/etc/protocols"
47 let xfm = transform lns filter