Imported Upstream version 1.7.0
[platform/upstream/augeas.git] / lenses / soma.aug
1 (* Soma module for Augeas
2  Author: Free Ekanayaka <free@64studio.com>
3
4  Reference: man 5 soma.cfg
5
6 *)
7
8 module Soma =
9
10    autoload xfm
11
12 (************************************************************************
13  *                           USEFUL PRIMITIVES
14  *************************************************************************)
15
16 let eol        = Util.eol
17 let comment    = Util.comment
18 let empty      = Util.empty
19
20 let sep_eq     = del /[ \t]*=[ \t]*/ " = "
21
22 let sto_to_eol = store /([^ \t\n].*[^ \t\n]|[^ \t\n])/
23
24 let word       = /[A-Za-z0-9_.-]+/
25
26 (************************************************************************
27  *                               ENTRIES
28  *************************************************************************)
29
30 let entry     = [ key word
31                 . sep_eq
32                 . sto_to_eol
33                 . eol ]
34
35 (************************************************************************
36  *                                LENS
37  *************************************************************************)
38
39 let lns        = (comment|empty|entry) *
40
41 let filter     = incl "/etc/somad/soma.cfg"
42
43 let xfm        = transform lns filter