B | |
BackupPCHosts | |
bang, Syslog | |
bare, Erlang | |
base definitions, Toml | |
Base entry, Nslcd | |
BASIC ATTRIBUTES, Ldif | |
basic tokens, Aliases | |
bcast, Chrony | |
bind_entry, Redis | |
blacklist, Modprobe | |
blank_val | |
block | |
BLOCK CONSTRUCTIONS | |
block_entry, Test_Build | |
block_generic, Build | |
block_ldelim_default, Build | |
block_ldelim_newlines_default | |
block_ldelim_newlines_re | |
block_ldelim_re, Build | |
block_names, Dovecot | |
block_newline | |
block_newlines_spc, Build | |
block_rdelim_default, Build | |
block_rdelim_newlines_default | |
block_rdelim_newlines_re | |
block_rdelim_re, Build | |
block_re, Nginx | |
block_setdefault, Build | |
body, Xinetd | |
bool | |
bool_warn, Host_Conf | |
boolean, Erlang | |
boot | |
BOOT ENTRIES, Grub | |
boot_entry, Grub | |
boot_error, Grub | |
boot_setting, Grub | |
BootConf | |
brackets | |
Build | |
by, Reprepro_Uploaders | |
by_group, Reprepro_Uploaders | |
by_key, Reprepro_Uploaders | |
byte, Rx |
Deletes a bang and default to it
let bang = Util.del_str "!"
Store a bare Rx.word
let bare = store Rx.word
broadcast has specific syntax
let bcast = [ Util.indent . key "broadcast" . space . [ label "interval" . store integer ] . space . store_address . ( space . [ label "port" . store integer ] )? . eol ]
The “bind” entry can be passed one or several ip addresses.
let bind_entry = let ip = del_ws_spc . Quote.do_quote_opt_nil (store Rx.ip) in indent . [ key "bind" . [ label "ip" . ip ]+ ] . eol
let blacklist = Build.key_value_line_comment "blacklist" sep_space sto_no_spaces comment
let blank_val = del /^\z/
let blank_val = del /["']{2}/ "\"\""
A block enclosed in brackets
let block (entry:lens) = block_setdelim entry block_ldelim_re block_rdelim_re block_ldelim_default block_rdelim_default
Map block enclosed in brackets recursively.
let rec block = [ indent . key block_names . (Sep.space . Quote.do_dquote_opt (store /!?[\/A-Za-z0-9_-]+/))? . block_newlines (entry|block|mailbox) comment . eol ]
A simple block with just a block title
let block (kw:regexp) (sto:lens) = lens_block (key kw) sto
A block containing simple entries
let block (entry : lens) = [ Util.indent . block_head . Build.block_newlines entry Util.comment . Util.eol ]
The block used for testing
let block = Build.block block_entry
The block entry used for testing
let block_entry = Build.key_value "test" Sep.equal (store Rx.word)
A block enclosed in brackets
let block_generic (entry:lens) (entry_noindent:lens) (entry_noeol:lens) (entry_noindent_noeol:lens) (comment:lens) (comment_noindent:lens) (ldelim_re:regexp) (rdelim_re:regexp) (ldelim_default:string) (rdelim_default:string) = let block_single = entry_noindent_noeol | comment_noindent in let block_start = entry_noindent | comment_noindent in let block_middle = (entry | comment)* in let block_end = entry_noeol | comment in del ldelim_re ldelim_default . ( ( block_start . block_middle . block_end ) | block_single ) . del rdelim_re rdelim_default
let block_names = /dict|userdb|passdb|protocol|service|plugin|namespace|map|fields|unix_listener|fifo_listener|inet_listener/
A block enclosed in brackets, with newlines forced and indentation defaulting to a tab.
let block_newlines (entry:lens) (comment:lens) = del block_ldelim_newlines_re block_ldelim_newlines_default . ((entry | comment) . (Util.empty | entry | comment)*)? . del block_rdelim_newlines_re block_rdelim_newlines_default
A block enclosed in brackets, with newlines forced and indentation defaulting to a tab.
let block_newlines (entry:lens) (comment:lens) = del block_ldelim_newlines_re block_ldelim_newlines_default . ((entry | comment) . (Util.empty | entry | comment)*)? . del block_rdelim_newlines_re block_rdelim_newlines_default
A block enclosed in brackets, with newlines forced and indentation defaulting to a tab.
let block_newlines_spc (entry:lens) (comment:lens) = del (/[ \t\n]/ . block_ldelim_newlines_re) block_ldelim_newlines_default . ((entry | comment) . (Util.empty | entry | comment)*)? . del block_rdelim_newlines_re block_rdelim_newlines_default
let block_rdelim_default = "}"
let block_rdelim_newlines_default = "}"
let block_rdelim_newlines_default = "}"
let block_rdelim_newlines_re = /[ \t]*\}/
let block_rdelim_newlines_re = /[ \t]*\}/
let block_rdelim_re = /[ \t\n]*\}/
The keywords reserved for block entries
let block_re = "http" | "events" | "server" | "mail" | "stream"
We would really like to say “the body can contain any of a list of a list of attributes, each of them at most once”; but that would require that we build a lens that matches the permutation of all attributes; with around 40 individual attributes, that’s not computationally feasible, even if we didn’t have to worry about how to write that down.
let body (attr:lens) = Build.block_newlines_spc (indent . attr . Util.eol) Util.comment
A boolean switch
let bool (kw:regexp) = Build.key_value_line kw Sep.space sto_bool
A boolean entry
let bool = [ key "PRUNE_BIND_MOUNTS" . Sep.space_equal . Quote.do_dquote (store /[01]|no|yes/) . Util.doseol ]
A boolean switch with extended values
let bool_warn (kw:regexp) = Build.key_value_line kw Sep.space sto_bool_warn
Store a boolean value
let boolean = store /true|false/
boot [image [-acds]] XXX: the last arguments are not always needed, so make them optional
let boot = let image = [ label "image" . store fspath ] in let arg = [ label "arg" . store word ] in Build.key_value_line "boot" space (image . space . arg)
let boot = let line = ((boot_setting|comment)* . boot_setting)? in [ label "title" . title . line ]
boot entries
let boot_entry = let boot_arg_re = "root" | "initrd" | "rootnoverify" | "uuid" | "findroot" | "bootfs" (* Solaris extensions *) in kw_boot_arg boot_arg_re | kernel | chainloader | kw_pres "quiet" (* Seems to be a Ubuntu extension *) | savedefault | configfile | module_line | map_line | kw_pres "lock" | kw_pres "makeactive" | password_arg
Accept lines not matching boot_entry and stuff them into ‘#error’ nodes
let boot_error = let kw = /lock|uuid|password|root|initrd|rootnoverify|findroot|bootfs/ |/configfile|chainloader|title|boot|quiet|kernel|
a valid boot setting or a line that looks like one but is an #error
let boot_setting = boot_entry | boot_error
Put a lens inside brackets
let brackets (l:lens) (r:lens) (lns:lens) = l . lns . r
Test brackets
let brackets = [ Build.brackets Sep.lbracket Sep.rbracket (key Rx.word) ]
by statements define who is allowed to upload.
let by = [ key "by" . Sep.space . ( store ("anybody"|"unsigned") | by_key | by_group ) ]
Authenticate packages by a groupname.
let by_group = value "group" . [ key "group" . Sep.space . store Rx.word ]
When a key is used to authenticate packages, the value can either be a key ID or “any”:
let by_key = let any_key = [ store "any" . Sep.space . key "key" ] in let named_key = [ key "key" . Sep.space . store (Rx.word - "any") ] in value "key" . (any_key | named_key)
let byte = /25[0-5]?|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9]/