| S | |
| schedule, Cron | |
| screen, Xorg | |
| section, Xorg | |
| section_entry, Xorg | |
| section_re, Xorg | |
| SECTIONS, Xorg | |
| secton_re_obsolete, Xorg | |
| sep, IniFile | |
| Sep | |
| sep_col, Sudoers | |
| sep_com, Sudoers | |
| sep_cont, Sudoers | |
| sep_cont_opt, Sudoers | |
| sep_default, IniFile | |
| sep_dquote | |
| sep_eq | |
| sep_re, IniFile | |
| sep_spc | |
| Separators | |
| service_attr, Xinetd | |
| Services | |
| shellvar, Cron | |
| spec, Sudoers | |
| spec_list, Sudoers | |
| Split, Util | |
| Sshd | |
| stdexcl, Util | |
| sto_integer, Sudoers | |
| sto_to_com, Sudoers | |
| sto_to_com_cmnd, Sudoers | |
| sto_to_com_col, 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 | |
| Stores | |
| Sudoers | |
| T | |
| tag_spec, Sudoers | |
| the valid values for schedules, Cron | |
| time, Cron | |
| title, IniFile | |
| Title definition, IniFile | |
| title_label, IniFile | |
| to_eol, Xorg | |
| TODO, IniFile | |
| U | |
| Usage Example | |
| USEFUL PRIMITIVES | |
| user, Cron | |
| USER SPECIFICATION, Sudoers | |
| user_alias, Sudoers | |
| Util | |
| V | |
| videoram, Xorg | |
| X | |
| Xinetd | |
| Xorg |
Time in the format “@keyword”
let schedule = [ label "schedule" . Util.del_str "@" . store schedule_re ]
The Screen entry of ServerLayout
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 ]
A section in xorg.conf
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 ]
let section_entry = option | screen | display | input_device | driver | identifier | videoram | default_depth | device | entry_generic | empty | comment
Known values for Section names
let section_re = /( Files|ServerFlags|Module|InputDevice|Device|VideoAdaptor|Monitor|Modes|Screen|ServerLayout|DRI|Vendor )/
Generic separator
let sep ( pat:regexp ) (default:string) = Util.del_opt_ws "" . del pat default
let sep_col = sep_cont_opt . Util.del_str ":" . sep_cont_opt
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]* )/ " "
The default separator value
let sep_default = "="
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
The default regexp for a separator
let sep_re = /[=:]/
let sep_spc = Util.del_ws_spc
let sep_spc = del /[ \t]+/ " "
let sep_spc = Util.del_ws_spc
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”|..)
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" )
A shell variable in crontab
let shellvar = [ key /[A-Z][A-Za-z0-9]*/ . sep_eq . Shellvars.simple_value . eol ]
A user specification, listing colon-separated spec_lists
let spec = [ label "spec" . indent . alias_list "user" sto_to_com_user . sep_cont . spec_list . ( sep_col . spec_list )* . eol ]
Group of hosts with cmnd_spec_list
let spec_list = [ label "host_group" . alias_list "host" sto_to_com . sep_eq . cmnd_spec_list ]
Exclusion for files that are commonly not wanted/needed
let stdexcl = ( excl "*~" ) . (excl "*.rpmnew") . (excl "*.rpmsave") . (excl "*.augsave") . (excl "*.augnew")
let sto_integer = store /[0-9]+/
There could be a \ in the middle of a command
let sto_to_com = store /( [^,=:#() \t\n\\\\][^,=:#()\n]*[^,=:#() \t\n\\\\] )|[^,=:#() \t\n\\\\]/
sto_to_com_cmnd does not begin or end with a space
let sto_to_com_cmnd = store /( [^,=:#() \t\n\\\\][^,=:#()\n]*[^,=:#() \t\n\\\\] )|[^,=:#() \t\n\\\\]/
let sto_to_com_col = store /[^",=#() \t\n\\\\]+/ (* " relax emacs *)
let sto_to_com_user = store ( /[^,=:#() \t\n]+/ - /(User|Runas|Host|Cmnd)_Alias|Defaults.*/ )
Store until comment
let sto_to_comment = Util.del_opt_ws "" . store /[^;# \t\n][^;#\n]*[^;# \t\n]|[^;# \t\n]/
Store until end of line
let sto_to_eol = Util.del_opt_ws "" . store /( [^ \t\n].*[^ \t\n]|[^ \t\n] )/
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 *)
Tag specification for spec
let tag_spec = [ label "tag" . store /(NO)?(PASSWD|EXEC|SETENV)/ . sep_col ]
Time in the format “minute hour dayofmonth month dayofweek”
let time = [ label "time" . minute . sep_spc . hour . sep_spc . dayofmonth . sep_spc . month . sep_spc . dayofweek ]
Title for record.
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
Match everything from here to eol, cropping whitespace at both ends
let to_eol = /[^ \t\n]( .*[^ \t\n] )?/
let user = [ label "user" . store Rx.word ]
User_Alias, see alias_field
let user_alias = alias_entry "User_Alias" "user" sto_to_com
let videoram = entry_int "VideoRam" /[vV]ideo[rR]am/