F | |
facilities, Syslog | |
family, Resolv | |
field | |
field_int, Channels | |
field_no_colon, Channels | |
field_word, Channels | |
file, Syslog | |
filter | |
filters, Xymon_Alerting | |
flag | |
flag_line | |
flat_literal, LVM | |
format | |
fs_types, Mke2fs | |
fs_types_entry, Mke2fs | |
fs_types_record, Mke2fs | |
fs_types_title, Mke2fs | |
fspath, BootConf | |
G | |
glob, Erlang | |
global_conf, Keepalived | |
global_defs, Keepalived | |
global_defs_field, Keepalived | |
group | |
H | |
host | |
host_alias, Sudoers | |
hostname | |
hostnames, Syslog | |
hour, Cron | |
I | |
identifier | |
ignore, Xymon_Alerting | |
include | |
include_dir, Nrpe | |
includedir, Sudoers | |
includes, Xinetd | |
indent | |
indented_entry, IniFile | |
indented_title, IniFile | |
indented_title_label, IniFile | |
input_device, Xorg | |
install_remove, Modprobe | |
integer, Erlang | |
ip6_dotint, Resolv | |
ipaddr | |
ipaddr_or_hostname, Pg_Hba | |
ipdev, Keepalived | |
ipv4, Networks | |
item, Nrpe | |
item_re, Nrpe | |
J | |
job_identifier, Anacron | |
json, OpenShift_Quickstarts |
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
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 ]
Filters are made out of any of the above filter definitions
let filters = page | expage | group | exgroup | host | exhost | service | exservice | color | time | duration | recover | notice
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 simple flag line, consisting of a single key
let flag_line (kw:regexp) = [ key kw . eol ]
let flag_line = Build.flag_line Rx.word
A literal without structure
let flat_literal = int|str
sun, hesoid
let format = Rx.word
The format recipient definition
let format = [ key "FORMAT" . equal . store_word . ws . [ label "filters" . filters* ] . ws_or_eol ]
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
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 group filter definition
let group = [ ws . key "GROUP" . equal . store_word . ws ]
let host = /[^:# \n\t]+/
The host filter definition
let host = [ ws . key "HOST" . equal . store_word . ws ]
Host_Alias, see alias_field
let host_alias = alias_entry "Host_Alias" "host" sto_to_com
let hostname = /[^-:#\(\), \n\t][^:#\(\), \n\t]*/
a program begins with an optional hash, and a + or -
let hostname = [ label "hostname" . opt_hash . ( plus | [ Build.xchgs "-" "reverse" ] ) . hostnames . eol . entries ]
a list of hostnames
let hostnames = label_opt_list_or "hostname" (store Rx.word) comma "*"
let hour = [ label "hour" . store num ]
The left hand side of a definition
let identifier = /[a-zA-Z0-9_-]+/
let identifier = entry_str "Identifier" /[iI]dentifier/
The ignore recipient definition
let ignore = [ key "IGNORE" . ws . [ label "filters" . filters* ] . ws_or_eol ]
A file inclusion /!\ The manpage is not clear on the syntax
let include = [ indent . key "#include" . Sep.space . store Rx.fspath . eol ]
An include line starting with a “+” and a map name
let include = [ seq "entry" . store "+" . Util.del_opt_ws "" . [ label "map" . store map_name ] . Util.eol ]
let include = Build.key_value_line "include" Sep.space (store Rx.fspath)
An include entry.
let include = [ key "include" . [ label "file" . eq . store word . eol ] ]
Includes another file at this position
let include = [ key ".include" . Util.del_ws_spc . sto_value . (comment|eol) ]
let include = [ key "include" . ws . store_word . eol ]
include_dir=/path/to/dir/
let include_dir = [ key "include_dir" . [ label "dir" . eq . store word . eol ] ]
let includedir = [ key /#include(dir)?/ . Sep.space . store Rx.fspath . eol ]
It would be nice if we could use the directories given in include and includedir directives to parse additional files instead of hardcoding all the places where xinetd config files can be found; but that is currently not possible, and implementing that has a good amount of hairy corner cases to consider.
let includes = Build.key_value_line /include(dir)?/ Sep.space (store Rx.no_spaces)
An indentation
let indent = Util.indent
let indent = Util.indent
let indent = Util.indent
let indent = Util.indent
Generic INI File entry that might be indented with an arbitrary amount of whitespace
let indented_entry (kw:regexp) (sep:lens) (comment:lens) = entry_generic (Util.indent . key kw) sep comment_re comment
Title for record.
let indented_title (kw:regexp) = Util.indent . title kw
Title for record.
let indented_title_label (name:string) (kw:regexp) = Util.indent . title_label name kw
let input_device = [ indent . del /[iI]nput[dD]evice/ "InputDevice" . label "InputDevice" . sep_spc . quoted_string_val . [ label "option" . sep_spc . quoted_string_val ]* . eol ]
Store a Rx.integer
let integer = store Rx.integer
ip6-dotint option, which supports negation
let ip6_dotint = let negate = [ del "no-" "no-" . label "negate" ] in [ negate? . key "ip6-dotint" ]
An IP address or range with an optional mask
let ipaddr = label "ipaddr" . store /[0-9.-]+/ . prefixlen?
An IP address or range with an optional mask
let ipaddr = [label "ipaddr" . store Rx.ip . netmask?]
let ipaddr_or_hostname = ipaddr | hostname
A device for IP addresses
let ipdev = [ key "dev" . sep_spc . sto_word ]
A network IP, trailing .0 may be omitted
let ipv4 = let dot = "." in let digits = /(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)/ in digits . (dot . digits . (dot . digits . (dot . digits)?)?)?
regular entries
let item = [ key item_re . eq . store word . eol ]
let item_re = /[^#=\n\t\/ ]+/ - (/command\[[^]\/\n]+\]/ | "include" | "include_dir")
The job_identifier for an entry
let job_identifier = [ label "job-identifier" . store Rx.word ]
let json = Json.lns