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
M
 MAIN OPTIONS, Resolv
 map_line, Grub
 menu_setting, Grub
 method, Pg_Hba
 minute, Cron
 Mke2fs
 modpath, Solaris_System
 Modprobe
 module_line, Grub
 Modules
 Modules_conf
 month, Cron
 mount_option, FAI_DiskConfig
 mount_option_value, FAI_DiskConfig
 mount_options, FAI_DiskConfig
 mountpoint, FAI_DiskConfig
 mountpoint_kw, FAI_DiskConfig
 multiboot_arg, Grub
 multiline_ace, Test_IniFile
 multiline_test, Test_IniFile
N
 NagiosConfig
 NagiosObjects
 name
 name_re, AptConf
 name_re_colons, AptConf
 named_block, Keepalived
 named_block_arg, Keepalived
 named_block_arg_title, Keepalived
 nameserver, Resolv
 neg1, Rx
 negate_node, Sudoers
 netgroup, Access
 netmask, Resolv
 Networks
 no_spaces, Rx
 nocomma, Test_Aliases
 notation_def, Test_Xml.Xml
 Nrpe
 Nsswitch
 num, Cron
O
 opt_eol, Keepalived
 opt_hash, Syslog
 opt_list, Build
 opt_plus, Syslog
 opt_space
 opt_tab, Sep
 opt_ws, Grub
 option
 options
 optval
 org, Desktop.Freedesktop
 origin_list, Access
P
 param, NagiosConfig
 param_def, NagiosConfig
 parameter, Sudoers
 parameter_flag, Sudoers
 parameter_integer, Sudoers
 parameter_list, Sudoers
 parameter_lists, Sudoers
 parameter_string, Sudoers
 partition, FAI_DiskConfig
 password_arg, Grub
 Pbuilder
 Pg_Hba
 pipe, Syslog
 plus, Syslog
 port, Services
 prefixlen, Keepalived
 program, Syslog
 Program matching, Syslog
 programs, Syslog
 prolog, Test_Xml.Xml
 Prolog and declarations, Test_Xml
 protocol, Services
 puppetfileserver.aug
Q
 quoted_string_val, Xorg
let map_line = [ command "map" "\t" . spc . [ label "from" . store /[()A-za-z0-9]+/ ] . spc . [ label "to" . store /[()A-za-z0-9]+/ ] . eol ]
let menu_setting = kw_menu_arg "default" | kw_menu_arg "fallback" | kw_pres "hiddenmenu" | kw_menu_arg "timeout" | kw_menu_arg "splashimage" | kw_menu_arg "gfxmenu" | kw_menu_arg "background" | serial | terminal | password_arg | color | device
let method = [ label "method" . store Rx.word . ( Sep.tab . option )? ]
can contain an option
let minute = [ label "minute" . store num ]
Parses /etc/mke2fs.conf
let modpath = [ seq "modpath" . store /[^ :\t\n]+/ ]
Individual moddir search path entry
Parses /etc/modprobe.conf and /etc/modprobe.d/*
let module_line = [ command /module\$?/ "\t" . spc . kernel_args ]
Solaris extension adds module$ and kernel$ for variable interpolation
Parses /etc/modules
Parses /etc/modules.conf and /etc/conf.modules
let month = [ label "month" . store alphanum ]
let mount_option = [ seq "mount_option" . store /[^,= \t\n]+/ . mount_option_value? ]
Counting options
let mount_option_value = [ label "value" . Util.del_str "=" . store /[^,= \t\n]+/ ]
let mount_options = [ label "mount_options" . counter "mount_option" . Build.opt_list mount_option Sep.comma ]
An array of mount_options
let mountpoint_kw = "-" (* do not mount *) | "swap" (* swap space *)
let multiboot_arg = [ label "@path" . store (Rx.word . "/" . Rx.no_spaces) ]
Permits a second form for Solaris multiboot kernels that take a path (with a slash) as their first arg, e.g.
let multiline_ace = IniFile.entry_multiline IniFile.entry_re sep_ace comment_ace
let multiline_test = "test_ace = val1\n val2\n val3\n"
Parses /etc/nagios3/*.cfg
Parses /etc/nagios3/objects/*.cfg
let name = /([^ \t\n#:|@]+|"[^"|\n]*")/ (* " make emacs calm down *)
let name = /[^@%# \t\n][^ \t\n]*/
let name = [ label "name" . store /[^\/ \t\n]+/ ]
LVM volume group name
let name_re = /[A-Za-z][A-Za-z-]*/
Regex for entry names
let name_re_colons = /[A-Za-z][A-Za-z:-]*/
Regex for entry names with colons
let named_block (kw:string) (sto:lens) = lens_block (key kw . sep_spc . sto_word) sto
A block with a block title and name
let named_block_arg (kw:string) (name:string) (arg:string) (sto:lens) = lens_block (named_block_arg_title kw name arg) sto
A block with a block title, a name and an argument
let named_block_arg_title (kw:string) (name:string) (arg:string) = key kw . sep_spc . [ label name . sto_word ] . sep_spc . [ label arg . sto_word ]
A title lens for named_block_arg
let nameserver = Build.key_value_line_comment "nameserver" Sep.space (store Rx.ip) comment_eol
A nameserver entry
let neg1 = /[^,# \n\t]+/
Anything but a space, a comma or a comment sign
let negate_node = [ del "!" "!" . label "negate" ]
Negation of boolean values for defaults.
let netgroup = [ label "netgroup" . Util.del_str "@" . store user_re . [ label "nisdomain" . Util.del_str "@@" . store Rx.word ]? ]
Format is @NETGROUP[@@NISDOMAIN]
let netmask = [ label "netmask" . Util.del_str "/" . store Rx.ip ]
A network mask for IP addresses
Parses /etc/networks
let no_spaces = /[^ \t\n]+/
A string with no spaces
let nocomma = "alias: target1,target2\n"
Don’t have to have whitespace after a comma
test Xml.notation_def get "<!NOTATION not3 SYSTEM \"\">" = { "!NOTATION" = "not3" { "SYSTEM" = "" } }
Parses nagios-nrpe configuration files.
Parses /etc/nsswitch.conf
let num = /[0-9*][0-9\/,*-]*/
let opt_eol = del /[ \t]*\n?/ " "
let opt_hash = del /#?/ ""
deletes an optional # sign
let opt_list (lns:lens) (sep:lens) = lns . ( sep . lns )*
Same as list, but there might be only one element in the list
let opt_plus = del /\+?/ ""
deletes an optional + sign
let opt_space = /[ \t]*/
An optional space or tab
let opt_space = del Rx.opt_space ""
Deletes a Rx.opt_space and default to an empty string
let opt_tab = del Rx.opt_space "\t"
Deletes a Rx.opt_space and default to a tab
let opt_ws = Util.del_opt_ws ""
let option =
let option = [ label "option" . store word ]
part of method
let option = [ indent . del /[oO]ption/ "Option" . label "Option" . sep_spc . quoted_string_val . [ label "value" . sep_spc . quoted_string_val ]* . eol ]
let options = let opt_value = /[^#" \t\n\\\\]+|"[^#"\n\\\\]*"/ in let option = [ key Rx.word . (Util.del_str "=" . store opt_value)? ] in [ key "options" . sep_space . sto_no_spaces . (sep_space . option)* . Util.comment_or_eol ]
let options = let options_entry = Build.key_value ("ndots"|"timeout"|"attempts") (Util.del_str ":") (store Rx.integer) | Build.flag ("debug"|"rotate"|"no-check-names" |"inet6"|"ip6-bytestring"|"edns0") | ip6_dotint in Build.key_value_line_comment "options" Sep.space (Build.opt_list options_entry Sep.space) comment_eol
Options values
let optval = /[A-Za-z0-9_.:-]+/
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html
let origin_list = let origin_re = Rx.no_spaces - /[Ee][Xx][Cc][Ee][Pp][Tt]/ in Build.opt_list [ label "origin" . store origin_re ] Sep.space
origin_list can be a single ipaddr/originname/domain/fqdn or a list of those values
let param = [ Util.indent . param_def . [ Sep.space . param_def ]* . Util.eol ]
Params can have sub params
let param_def = key /[A-Za-z0-9_]+/ . Sep.opt_space . Sep.equal . Sep.opt_space . store Rx.no_spaces
define a field
let parameter = parameter_flag | parameter_integer | parameter_string | parameter_lists
A single parameter for defaults
let parameter_flag_kw = "always_set_home" | "authenticate" | "env_editor" | "env_reset" | "fqdn" | "ignore_dot" | "ignore_local_sudoers" | "insults" | "log_host" | "log_year" | "long_otp_prompt" | "mail_always" | "mail_badpass" | "mail_no_host" | "mail_no_perms" | "mail_no_user" | "noexec" | "path_info" | "passprompt_override" | "preserve_groups" | "requiretty" | "root_sudo" | "rootpw" | "runaspw" | "set_home" | "set_logname" | "setenv" | "shell_noargs" | "stay_setuid" | "targetpw" | "tty_tickets" | "visiblepw" | "closefrom_override" | "closefrom_override" | "compress_io" | "fast_glob" | "log_input" | "log_output" | "pwfeedback" | "umask_override" | "use_pty"
A flag parameter for defaults
let parameter_integer_nobool_kw = "passwd_tries"
An integer parameter for defaults
let parameter_list = parameter . ( sep_com . parameter )*
A list of comma-separated parameters for defaults
let parameter_lists_kw = "env_check" | "env_delete" | "env_keep"
A single list parameter for defaults
let parameter_string_nobool_kw = "badpass_message" | "editor" | "mailsub" | "noexec_file" | "passprompt" | "runas_default" | "syslog_badpri" | "syslog_goodpri" | "timestampdir" | "timestampowner" | "secure_path"
A string parameter for defaults
let partition = [ label "partition" . Util.del_str "." . store /[0-9]+/ ]
An optional partition number for disk
let password_arg = [ key "password" . (spc . [ switch "md5" ])? . spc . store (/[^ \t\n]+/ - "--md5") . (spc . [ label "file" . store /[^ \t\n]+/ ])? . eol ]
Parses /etc/pbuilderrc, /etc/pbuilder/pbuilderrc
Parses PostgreSQL’s pg_hba.conf
let pipe = Util.del_str "|"
Deletes a pipe and default to it
let plus = Util.del_str "+"
Deletes a plus and default to it
let port = [ label "port" . store num_re ]
let prefixlen = [ label "prefixlen" . Util.del_str "/" . sto_num ]
A prefix for IP addresses
let program = [ label "program" . opt_hash . bang . ( opt_plus | [ Build.xchgs "-" "reverse" ] ) . programs . eol . entries ]
a program begins with an optional hash, a bang, and an optional + or -
let programs = label_opt_list_or "program" (store word) comma "*"
a list of programs
test Xml.prolog get "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" = { "#declaration" { "#attribute" { "version" = "1.0" } { "encoding" = "UTF-8" } } }
The XML prolog tag is mapped in a “#declaration” node, which contains an “#attribute” node with various attributes of the tag.
let protocol = [ label "protocol" . store protocol_re ]
let quoted_string_val = del "\"" "\"" . store /[^"\n]+/ . del "\"" "\""
Close