H | |
hex, Rx | |
home, Passwd | |
host | |
host_alias, Sudoers | |
Host_Conf | |
host_flags, Chrony | |
host_list, Chrony | |
host_options, Chrony | |
hostname | |
Hostname | |
Hostname maching, Syslog | |
hostnames, Syslog | |
Hosts_Access | |
hour, Cron | |
Htpasswd | |
http_check, Test_Keepalived | |
http_check_field, Keepalived | |
http_url_check_field, Keepalived | |
hwcap, Keepalived | |
I | |
identifier | |
identifier_re, Access | |
ignore, Xymon_Alerting | |
Import provided expressions, Chrony | |
include | |
include_dir, Nrpe | |
includedir, Sudoers | |
includes, Xinetd | |
indent | |
indented_entry, IniFile | |
indented_title, IniFile | |
indented_title_label, IniFile | |
INI File settings | |
IniFile | |
input_device, Xorg | |
input1, Test_Xml | |
Inputrc | |
install_remove, Modprobe | |
int, Xorg | |
integer | |
Internal primitives, IniFile | |
ip | |
ip_port, Keepalived | |
ip6_dotint, Resolv | |
ipaddr | |
ipaddr_or_hostname, Pg_Hba | |
ipdev, Keepalived | |
IPs, Rx | |
Iptables | |
ipv4 | |
ipv6, Rx | |
Iscsid | |
iso_8601, Rx | |
istepslew, Chrony | |
item, Nrpe | |
item_re, Nrpe | |
J | |
JettyRealm | |
JMXAccess | |
JMXPassword | |
job_identifier, Anacron | |
json, OpenShift_Quickstarts |
A hex value
let hex = /0x[0-9a-fA-F]+/
pw_dir
let home = [ label "home" . sto_to_col? . colon ]
let host = /[^:# \n\t]+/
The (ex)?host filter definition
let host = kw_word /(EX)?HOST/
Host_Alias, see alias_field
let host_alias = alias_entry "Host_Alias" "host" sto_to_com
let host_flags = [ space . key cmd_flags ]
Find all ntp servers/peers and their flags/options
let host_list = [ Util.indent . key server_peer . space . store address_re . ( host_flags | host_options )* . eol ]
let host_options = [ space . key cmd_options . space . store integer ]
let hostname = /[^-:#\(\), \n\t][^:#\(\), \n\t]*/
Hostname, FQDN or part of an FQDN possibly starting with a dot.
let hostname = /\.?[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*/
A valid RFC 1123 hostname
let hostname = /(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*( [A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])/
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 ]
An example of an HTTP health checker
let http_check = "virtual_server 192.168.1.11 22 { real_server 10.20.40.10 22 { HTTP_GET { url { path /mrtg2/ digest 9b3a0c85a887a256d6939da88aabd8cd status_code 200 } connect_timeout 3 connect_port 8080 nb_get_retry 5 delay_before_retry 10 } SSL_GET { connect_port 8443 } } } " test Keepalived.lns get http_check = { "virtual_server" { "ip" = "192.168.1.11" } { "port" = "22" } { "real_server" { "ip" = "10.20.40.10" } { "port" = "22" } { "HTTP_GET" { "url" { "path" = "/mrtg2/" } { "digest" = "9b3a0c85a887a256d6939da88aabd8cd" } { "status_code" = "200" } } { "connect_timeout" = "3" } { "connect_port" = "8080" } { "nb_get_retry" = "5" } { "delay_before_retry" = "10" } } { "SSL_GET" { "connect_port" = "8443" } } } }
let http_check_field = let num_re = /connect_(timeout|port)/ | "nb_get_retry" | "delay_before_retry" in field num_re sto_num | block "url" http_url_check_field
let http_url_check_field = let word_re = "digest" in let num_re = "status_code" in let to_eol_re = "path" in field word_re sto_word | field num_re sto_num | field to_eol_re sto_to_eol
let hwcap = let hwcap_val = [ label "bit" . store Rx.integer ] . Sep.space . [ label "name" . store Rx.word ] in Build.key_value_line "hwcap" Sep.space hwcap_val
The left hand side of a definition
let identifier = /[a-zA-Z0-9_-]+/
let identifier = entry_str "Identifier" /[iI]dentifier/
Regex for user/group identifiers
let identifier_re = /[A-Za-z0-9_.\\-]+/
The ignore recipient definition
let ignore = flag_filters_opt "IGNORE"
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 . (eol_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 Util.indent
let indent = Util.indent
An indentation
let indent = Util.indent
let indent = Util.indent
let indent = Util.indent
let indent = Util.indent
let indent = Util.indent
let indent = Util.indent
Delete indentation, including leading whitespace
let indent = del /[ \t]*/ ""
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 ]
let input1 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <html>\r <head> <title>Wiki</title> </head> <body> <h1>Augeas</h1> <p class=\"main\">Augeas is now able to parse XML files!</p> <ul> <li>Translate from XML to a tree syntax</li> <li>Translate from the tree back to XML</li> <!-- this is some comment --> <li>this</li> </ul> </body> </html> "
let int = /[0-9]+/
let integer = Rx.integer
Store a Rx.integer
let integer = store Rx.integer
One or more digits
let integer = /[0-9]+/
let ip = Rx.ip
An ipv4 or ipv6
let ip = ipv4 | ipv6
An IP space port pair
let ip_port = [ label "ip" . sto_word ] . sep_spc . [ label "port" . sto_num ]
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?
CIDR or ip+netmask
let ipaddr = /[0-9a-fA-F:.]+(\/[0-9]+|[ \t]+[0-9.]+)/
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)?)?)?
let ipv4 = let dot = "." in byte . dot . byte . dot . byte . dot . byte
let ipv6 = /(([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})/ | ( /([0-9A-Fa-f]{1,4}:){6}/ . /((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}/ . /(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))/ ) | ( /([0-9A-Fa-f]{1,4}:){0,5}:/ . /((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}/ . /(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))/ ) | ( /::([0-9A-Fa-f]{1,4}:){0,5}/ . /((((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))\.){3}/ . /(((25[0-5])|(1[0-9]{2})|(2[0-4][0-9])|([0-9]{1,2})))/ ) | ( /[0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}/ . /[0-9A-Fa-f]{1,4}/ ) | /(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})/ | /(([0-9A-Fa-f]{1,4}:){1,7}:)/
initstepslew has specific syntax
let istepslew = [ Util.indent . key "initstepslew" . space . [ label "threshold" . store number ] . ( space . store_address )+ . eol ]
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