Last change
on this file since 870 was 829, checked in by Bruno Cornec, 15 years ago |
r3259@localhost: bruno | 2009-07-12 19:59:58 +0200
Adds an Augeas lense to project-builder to make conf file analysis more easy.
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Rev | Line | |
---|
[829] | 1 | (* Project-Builder.org module for Augeas *)
|
---|
| 2 | (* Author: Raphael Pinson <raphink@gmail.com> *)
|
---|
| 3 | (* Maintainer: Bruno Cornec <bruno@project-builder.org> *)
|
---|
| 4 | (* $Id$ *)
|
---|
| 5 | (* *)
|
---|
| 6 | (* This lense for Augeas applies to Project-Builder.org *)
|
---|
| 7 | (* configuration files *)
|
---|
| 8 | (* *)
|
---|
| 9 | (* Format: Field Project = Value1 [, Value2, ...] *)
|
---|
| 10 | (* *)
|
---|
| 11 |
|
---|
| 12 | module ProjectBuilder =
|
---|
| 13 | autoload xfm
|
---|
| 14 |
|
---|
| 15 | let word = Rx.word
|
---|
| 16 | let ws = Util.del_ws_tab
|
---|
| 17 | let eol = Util.eol
|
---|
| 18 | let comment = Util.comment
|
---|
| 19 | let empty = Util.empty
|
---|
| 20 | let eq = del /[ \t]*=[ \t]*/ "="
|
---|
| 21 | let comma = del /[ \t]*,[ \t]*/ ","
|
---|
| 22 | let sto_value = [ label "value" . store /[^ \t\n,]+/ ]
|
---|
| 23 |
|
---|
| 24 | let record = [ key word . ws . store word
|
---|
| 25 | . eq
|
---|
| 26 | . Build.opt_list sto_value comma
|
---|
| 27 | . (eol|comment)
|
---|
| 28 | ]
|
---|
| 29 |
|
---|
| 30 | let lns = ( record | comment | empty )*
|
---|
| 31 |
|
---|
| 32 | let filter = (incl "/home/bruno/.pbrc") . Util.stdexcl
|
---|
| 33 |
|
---|
| 34 | let xfm = transform lns filter
|
---|
| 35 |
|
---|
| 36 | (* vim: set syntax=pascal *)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.