Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
S
 schedule, Cron
 screen, Xorg
 search, Resolv
 section, Xorg
 section_entry, Xorg
 section_re, Xorg
 SECTIONS, Xorg
 secton_re_obsolete, Xorg
 selector, Syslog
 selectors, Syslog
 semicolon, Syslog
 sep
 Sep
 sep_col, Sudoers
 sep_colon
 sep_com, Sudoers
 sep_cont, Sudoers
 sep_cont_opt, Sudoers
 sep_default, IniFile
 sep_dquote
 sep_eq
 sep_moddir, Solaris_System
 sep_re, IniFile
 sep_spc
 sep_tab
 sep_tab_opt, Syslog
 Separators
 service, Nsswitch
 service_attr, Xinetd
 Services
 set_operator, Solaris_System
 set_sep_spc, Solaris_System
 set_value, Solaris_System
 set_var, Solaris_System
 Shells
 shellvar, Cron
 single characters macro, Syslog
 Solaris_System
 sortlist, Resolv
 spec, Sudoers
 spec_list, Sudoers
 SPECIAL OPTIONS, Resolv
 Split, Util
 Sshd
 static_ipaddress_field, Keepalived
 static_routes, Keepalived
 static_routes_field, Keepalived
 stdexcl, Util
 sto_email_addr, Keepalived
 sto_integer, Sudoers
 sto_num, Keepalived
 sto_to_com, Sudoers
 sto_to_com_cmnd, Sudoers
 sto_to_com_col, Sudoers
 sto_to_com_host, Sudoers
 sto_to_com_user, Sudoers
 sto_to_comment, IniFile
 sto_to_eol, IniFile
 sto_to_eq, Sudoers
 sto_to_spc, Sudoers
 sto_to_spc_no_dquote, Sudoers
 sto_word, Keepalived
 Stores
 SUBNODE CONSTRUCTIONS, Build
 Sudoers
 Syslog
T
 tag_spec, Sudoers
 target
 tcp_check_field, Keepalived
 Test_login_defs
 the valid values for schedules, Cron
 time, Cron
 title
 Title definition
 title_label, IniFile
 to_eol, Xorg
 TODO, IniFile
 token, Syslog
 Top of the tree, Syslog
let schedule = [ label "schedule" . Util.del_str "@" . store schedule_re ]
Time in the format “@keyword”
let screen = [ indent . del /[sS]creen/ "Screen" . label "Screen" . sep_spc . [ label "num" . store int . sep_spc ]? . quoted_string_val . [ sep_spc . label "position" . store to_eol ]? . eol ]
The Screen entry of ServerLayout
let search = Build.key_value_line "search" Sep.space (
   Build.opt_list [label "domain" . store Rx.word] Sep.space
)
let section = [ indent . del "Section" "Section" . sep_spc . sep_dquote . key (section_re|section_re_obsolete) . sep_dquote . eol . section_entry* . indent . del "EndSection" "EndSection" . eol ]
A section in xorg.conf
let section_entry = option | screen | display | input_device | driver | identifier | videoram | default_depth | device | entry_generic | empty | comment
let section_re = /(
   Extensions|Files|ServerFlags|Module|InputDevice|Device|VideoAdaptor|Monitor|Modes|Screen|ServerLayout|DRI|Vendor
)/
Known values for Section names
The following obsolete section names are still recognised for compatibility purposes.
let selectors = label_opt_list "selector" selector semicolon
a list of selectors, separated by semicolons
let semicolon = sep_tab_opt . Util.del_str ";" . sep_tab_opt
Deletes a semicolon and default to it
let sep (pat:regexp) (default:string) = Sep.opt_space . del pat default
Generic separator
let sep = IniFile.sep /=[ \t]*/ "="
Generic separators to build lenses
let sep_col = sep_cont_opt . Util.del_str ":" . sep_cont_opt
let sep_colon = del /:[ \t]*/ ": "
The separator for database entries
let sep_colon = del /:[ \t]*/ ": "
The separator for key/value entries
let sep_com = sep_cont_opt . Util.del_str "," . sep_cont_opt
let sep_cont = del /([ \t]+|[ \t]*\\\\\n[ \t]*)/ " "
let sep_cont_opt = del /([ \t]*|[ \t]*\\\\\n[ \t]*)/ " "
let sep_default = "="
The default separator value
let sep_dquote = Util.del_str "\""
let sep_dquote = Util.del_str "\""
let sep_eq = Util.del_str "="
let sep_eq = sep_cont_opt . Util.del_str "=" . sep_cont_opt
let sep_moddir = del /[: ]+/ " "
The separator of directories in a moddir search path
let sep_re = /[=:]/
The default regexp for a separator
let sep_spc = Util.del_ws_spc
let sep_spc = Sep.space
let sep_spc = del /[ \t]+/ " "
let sep_spc = Util.del_ws_spc
let sep_tab = Sep.tab
let sep_tab = del /([ \t]+|[ \t]*\\\\\n[ \t]*)/ "\t"
let sep_tab_opt = del /([ \t]*|[ \t]*\\\\\n[ \t]*)/ ""
let service = [ label "service" . store Rx.word ]
The service specification like `files’, `db’, or `nis’
let service_attr = attr_one (
   "socket_type" | "protocol" | "wait" | "user" | "group" |"server" | "instances" | "rpc_version" | "rpc_number" | "id" | "port" | "nice" | "banner" | "bind" | "interface" | "per_source" | "groups" | "banner_success" | "banner_fail" | "disable" | "max_load" | "rlimit_as" | "rlimit_cpu" | "rlimit_data" | "rlimit_rss" | "rlimit_stack" | "v6only" | "deny_time" | "umask" | "mdns" "libwrap"
)
It is much faster to combine, for example, all the attr_one attributes into one regexp and pass that to a lens instead of using lens union (attr_one “a” | attr_one “b”|..)
Parses /etc/services
let set_operators = /[=&\|]/
Valid set operators: equals, bitwise AND and OR
let set_sep_spc = Util.del_opt_ws " "
let set_value = [ label "value" . store Rx.no_spaces ]
Sets an integer value or char pointer
let set_var = [ label "variable" . store Rx.word ]
Loads the variable name from a set command, no module
Parses /etc/shells
let shellvar = let key_re = Shellvars.key_re - "entry" in [ key key_re . sep_eq . Shellvars.simple_value . eol ]
A shell variable in crontab
Parses /etc/system on Solaris
let sortlist = Build.key_value_line "sortlist" Sep.space (
   Build.opt_list ipaddr Sep.space
)
let spec = [ label "spec" . indent . alias_list "user" sto_to_com_user . sep_cont . spec_list . ( sep_col . spec_list )* . eol ]
A user specification, listing colon-separated spec_lists
let spec_list = [ label "host_group" . alias_list "host" sto_to_com_host . sep_eq . cmnd_spec_list ]
Group of hosts with cmnd_spec_list
Parses /etc/ssh/sshd_config
let static_ipaddress_field = [ indent . ipaddr . (sep_spc . ipdev)? . comment_or_eol ]
The whole string is fed to ip addr add.
let static_routes = block "static_ipaddress" static_ipaddress_field | block "static_routes" static_routes_field
let static_routes_field = [ indent . label "route" . [ key "src" . sto_word ] . sep_spc . [ key "to" . sto_word ] . sep_spc . [ key "dev" . sto_word ] . comment_or_eol ]
src $SRC_IP to $DST_IP dev $SRC_DEVICE
let stdexcl = (
   excl "*~"
) . (excl "*.rpmnew") . (excl "*.rpmsave") . (excl "*.dpkg-old") . (excl "*.dpkg-new") . (excl "*.dpkg-bak") . (excl "*.dpkg-dist") . (excl "*.augsave") . (excl "*.augnew")
Exclusion for files that are commonly not wanted/needed
let sto_email_addr = store Rx.email_addr
let sto_integer = store /[0-9]+/
let sto_num = store Rx.integer
let sto_to_com = store /(
   [^,=:#() \t\n\\\\][^,=:#()\n]*[^,=:#() \t\n\\\\]
)|[^,=:#() \t\n\\\\]/
There could be a \ in the middle of a command
let sto_to_com_cmnd = store /(
   [^,=:#() \t\n\\\\]([^,=:#()\n\\\\]|\\\\[=:,\\\\])*[^,=:#() \t\n\\\\]
)|[^,=:#() \t\n\\\\]/
sto_to_com_cmnd does not begin or end with a space
let sto_to_com_col = store /[^",=#() \t\n\\\\]+/ (* " relax emacs *)
let sto_to_com_host = store /[^,=:#() \t\n\\\\]+/
let sto_to_com_user = store (
   /([^,=:#() \t\n]([^,=:#() \t\n]|(\\\\[ \t]))*[^,=:#() \t\n])|[^,=:#() \t\n]/ /(User|Runas|Host|Cmnd)_Alias|Defaults.*/
)
Escaped spaces are allowed
let sto_to_comment = Sep.opt_space . store /[^;# \t\n][^;#\n]*[^;# \t\n]|[^;# \t\n]/
Store until comment
let sto_to_eol = Sep.opt_space . store Rx.space_in
Store until end of line
let sto_to_eq = store /[^,=:#() \t\n\\\\]+/
let sto_to_spc = store /[^", \t\n\\\\]+|"[^", \t\n\\\\]+"/
let sto_to_spc_no_dquote = store /[^", \t\n\\\\]+/ (* " relax emacs *)
let sto_word = store word
Parses /etc/sudoers
parses /etc/syslog.conf
let tag_spec = [ label "tag" . store /(NO)?(PASSWD|EXEC|SETENV)/ . sep_col ]
Tag specification for spec
let target = Rx.device_name
let tcp_check_field = field "connect_timeout" sto_num | field "connect_port" sto_num
Test cases for the login_defs lense
let time = [ label "time" . minute . sep_spc . hour . sep_spc . dayofmonth . sep_spc . month . sep_spc . dayofweek ]
Time in the format “minute hour dayofmonth month dayofweek”
let title = IniFile.indented_title IniFile.record_re
Uses standard INI File title
let title (kw:regexp) = Util.del_str "[" . key kw . Util.del_str "]". eol
Title for record.
let title_label (
   name:string
) (kw:regexp) = label name . Util.del_str "[" . store kw . Util.del_str "]". eol
Title for record.
let to_eol = /[^ \t\n](.*[^ \t\n])?/
Match everything from here to eol, cropping whitespace at both ends
Things to add in the future
let token = /([a-z0-9]+|\*)/
alphanum or “*”
Close