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 | |
inherit, Yaml | |
INI File settings | |
IniFile | |
input_device, Xorg | |
input1, Test_Xml | |
Inputrc | |
install_remove, Modprobe | |
int, Xorg | |
integer | |
Internal primitives, IniFile | |
INVALID EXAMPLES, Test_Tmpfiles | |
invalid_age, Test_Tmpfiles | |
invalid_mode, Test_Tmpfiles | |
invalid_mode_alpha, Test_Tmpfiles | |
invalid_too_short, Test_Tmpfiles | |
invalid_type, Test_Tmpfiles | |
invalid_type_num, Test_Tmpfiles | |
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 |
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
the imposed indent is 2 spaces
let indent = del /[ \t]+/ " "
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_non_empty_string_val . [ label "option" . sep_spc . quoted_non_empty_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.relinteger
Store a Rx.integer
let integer = store Rx.integer
One or more digits
let integer = /[0-9]+/
Invalid example that contain invalid age
let invalid_age = "H /var/tmp/js 0000 jonhsmith 60 1sss foo\n"
Invalid example that contain invalid mode (bad int)
let invalid_mode = "H /var/tmp/js 8000 jonhsmith 60 1s foo\n"
Invalid example that contain invalid mode (letter)
let invalid_mode_alpha = "H /var/tmp/js a000 jonhsmith 60 1s foo\n" test Tmpfiles.lns get simple = simple_tree
Invalid example that do not contain path
let invalid_too_short = "H\n"
Invalid example that contain invalid type (bad letter)
let invalid_type = "e /var/tmp/js 0000 jonhsmith 60 1s foo\n"
Invalid example that contain invalid type (numeric)
let invalid_type_num = "1 /var/tmp/js 0000 jonhsmith 60 1s foo\n"
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 ]