a list of facilities, separated by commas
let facilities = label_opt_list "facility" (store token) comma
let family = let family_entry = Build.flag("inet4"|"inet6") in Build.key_value_line_comment "family" Sep.space (Build.opt_list family_entry Sep.space) comment_eol
fallbackdrift has specific syntax
let fdrift = [ Util.indent . key "fallbackdrift" . space . [ label "min" . store integer ] . space . [ label "max" . store integer ] . eol ]
A generic field
let field (name:string) (sto:regexp) = [ label name . store sto ]
let field (kw:regexp) (sto:lens) = indent . Build.key_value_line_comment kw sep_spc sto comment_eol
A field storing Rx.integer
let field_int (name:string) = field name Rx.integer
A field storing no_colon
let field_no_colon (name:string) = field name no_colon
A field storing Rx.word
let field_word (name:string) = field name Rx.word
a file may start with a “-” meaning it does not gets sync’ed everytime
let file = [ Build.xchgs "-" "no_sync" ]? . [ label "file" . store file_r ]
A full configuration file
let file = "# # Aliases in this file will NOT be expanded in the header from # Mail, but WILL be visible over networks or from /bin/mail. # Basic system aliases -- these MUST be present. mailer-daemon: postmaster postmaster: root # General redirections for pseudo accounts. bin: root , adm, bob daemon: root adm: root file: /var/foo pipe1: |/bin/ls pipe2 : |\"/usr/bin/ls args,\" "
a file begins with a / and get almost anything else after
let file_r = /\/[^ \t\n;]+/
File action with a specified template
let file_tmpl = Syslog.file . [ label "template" . Util.del_str ";" . store Rx.word ]
let filesystem = [ label "filesystem" . store filesystem_kw ]
Regexps for filesystem
let filesystem_kw = "-" | "swap"
let filters = "<Chain \"PreCache\"> <Rule \"no_fqdn\"> <Match \"regex\"> Host \"^[^\.]*$\" Invert false </Match> Target \"stop\" </Rule> </Chain> "
One or more filters
let filters = [ label "filters" . Build.opt_list rule_filter ws ]
Zero, one or more filters
let filters_opt = [ label "filters" . (ws . Build.opt_list rule_filter ws)? ]
A simple flag subnode, consisting of a single key
let flag (kw:regexp) = [ key kw ]
A single word
let flag (kw:regexp) = [ indent . key kw . comment_or_eol ]
let flag = Build.flag Rx.word
A flag value
let flag (kw:string) = Build.flag kw
A flag with optional filters
let flag_filters_opt (kw:string) = [ key kw . filters_opt ]
A simple flag line, consisting of a single key
let flag_line (kw:regexp) = [ key kw . eol ]
let flag_line = Build.flag_line Rx.word
Options without values
let flags = "dumponexit" | "generatecommandkey" | "lock_all" | "noclientlog" | "rtconutc" | "rtcsync"
A literal without structure
let flat_literal = int|str
a forge entry
let forge = [ Util.indent . key "forge" . Sep.space . Quote.any . Util.eol ]
sun, hesoid
let format = Rx.word
The format recipient definition
let format = kw_word_filters_opt "FORMAT"
let fs_option = [ key /createopts|tuneopts/ . Util.del_str "=\"" . store /[^"\n]*/ . Util.del_str "\"" ]
An array of fs_options
let fs_options =
A fs_types section
let fs_types = IniFile.record fs_types_title (fs_types_record | comment)
Possible entries under a fs_types_record group
let fs_types_entry =list_sto "features" ([del /\^/ "^" . label "disable"]? . key Rx.word) | list_sto "options" (key Rx.word . Util.del_str "=" . store Rx.word) | entry_sto "lazy_itable_init" ("true"|"false") | entry_sto ("flex_bg_size"|"auto_64-bit_support") Rx.integer
Fs group records under the fs_types section
let fs_types_record = [ label "filesystem" . Util.indent . store Rx.word . del /[ \t]*=[ \t]*\{[ \t]*\n/ " = {\n" . ((Util.indent . (fs_types_entry|common_entry)) | empty | comment)* . del /[ \t]*\}[ \t]*\n/ " }\n" ]
Title for the fs_types section
let fs_types_title = IniFile.title "fs_types"
let fspath = Rx.fspath
let fspath = Rx.fspath
A filesystem path
let fspath = /[^ \t\n]+/
let full = "path ~ ^/file_(metadata|content)/user_files/ # Set environments environment production, development environment foo method find, search auth yes method save allow /^(.+\.)?example.com$/ allow_ip 192.168.100.0/24 # Added in Puppet 3.0.0 # This overrides the previous auth authenticated any "
let generic_entry_re = /[^# \t\n\/]+/ - entries_re
A generic key/value option
let generic_opt (type:string) (kw:regexp) = [ key type . Util.del_str ":" . store kw ]
A generic key/list option
let generic_opt_list (type:string) (kw:regexp) = [ key type . Util.del_str ":" . counter "locallist" . Build.opt_list [seq "locallist" . store kw] Sep.comma ]
pw_gid
let gid = [ label "gid" . store integer . colon ]
Store a glob
let glob = Util.del_str lglob . store /[^\n"]+/ . Util.del_str rglob
A global configuration entry
let global_conf = global_defs | static_routes
A global_defs block
let global_defs = block "global_defs" global_defs_field
Possible fields in the global_defs block
let global_defs_field = let word_re = "smtp_server"|"lvs_id"|"router_id" in let num_re = "smtp_connect_timeout" in block "notification_email" email | field "notification_email_from" sto_email_addr | field word_re sto_word | field num_re sto_num
Format is (GROUP)
let group = [ label "group" . Util.del_str "(" . store identifier_re . Util.del_str ")" ]
let group = [ Util.del_str ":" . label "group" . store no_colon . eol . entry_or_comment* ]
The (ex)?group filter definition
let group = kw_word /(EX)?GROUP/
let group_record = generic_record "group" (Util.del_str "@" . store name)