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
E
 email, Keepalived
 email_addr, Rx
 empty
 empty_c_style, Util
 empty_dos, Util
 empty_element, Test_Xml.Xml
 empty_generic, Util
 empty_generic_re, Util
 empty1, Test_Xml
 empty2, Test_Xml
 empty3, Test_Xml
 empty4, Test_Xml
 encrypt, FAI_DiskConfig
 entries
 ENTRIES
 ENTRIES AND OPTIONS, Xorg
 entries_re, Xorg
 entry
 Entry, Syslog
 ENTRY
 entry includes comments, IniFile
 ENTRY LINE, Access
 ENTRY TYPES
 entry_ace, Test_IniFile
 entry_acf, Test_IniFile
 entry_ade, Test_IniFile
 entry_adf, Test_IniFile
 entry_bce, Test_IniFile
 entry_bcf, Test_IniFile
 entry_bde, Test_IniFile
 entry_bdf, Test_IniFile
 entry_command, Systemd
 entry_command_flags, Systemd
 entry_command_kw, Systemd
 entry_env, Systemd
 entry_env_kw, Systemd
 entry_fn, Systemd
 entry_gen, Postgresql
 entry_generic, Xorg
 entry_host, Automounter
 entry_int, Xorg
 entry_key
 entry_list, IniFile
 entry_list_nocomment, IniFile
 entry_location, Automounter
 entry_locations, Automounter
 entry_multi_kw, Systemd
 entry_multiline, IniFile
 entry_multiline_nocomment, IniFile
 entry_multimount, Automounter
 entry_multimount_sep, Automounter
 entry_multimounts, Automounter
 entry_options, Automounter
 entry_or_comment, Channels
 entry_path, Automounter
 entry_prefix, Cron
 entry_re
 entry_rgb, Xorg
 entry_single, Systemd
 entry_single_kw, Systemd
 entry_sto, Mke2fs
 entry_str, Xorg
 entry_value
 entry_xy, Xorg
 env, Test_Systemd
 env_key, Systemd
 eol
 eq, Grub
 equal
 Erlang
 Examples
 except
 Exclusions, Util
 exec, Test_Systemd
 Exports
let email = [ indent . label "email" . sto_email_addr . comment_or_eol ]
A simple email address entry
let email_addr = /[A-Za-z0-9_+.-]+@[A-Za-z0-9_.-]+/
To be refined
let empty = Util.empty
let empty = Util.empty
let empty = Util.empty
let empty = Util.empty
An Util.empty
let empty = Util.empty_c_style
A C-style empty line
let empty = Util.empty
let empty = Util.empty
let empty = Util.empty
let empty = Util.empty
let empty = Util.empty
let empty = Util.empty
let empty = Util.empty
let empty = Util.empty_generic Rx.opt_space
Comment are not allowed, even empty comments
let empty = [ eol ]
Empty line, an eol subnode
let empty = Util.empty
Map empty lines
let empty = [ del /#?[ \t]*\n/ "\n" ]
Map empty lines, including empty comments
let empty = IniFile.empty
let empty = Util.empty
let empty = Util.empty
let empty = Util.empty
let empty = Util.empty
let empty = [ del /[ \t]*\*?[ \t]*\n/ "\n" ]
Map empty lines, including empty asterisk comments
let empty = [ del /[ \t]*#?[ \t]*\n/ "\n" ]
Map empty lines
let empty = Util.empty
let empty = "keyword= " test Up2date.lns get empty = { "1" = "keyword" }
let empty = empty_generic empty_generic_re
Map empty lines, including empty comments
let empty = Util.empty
let empty_c_style = empty_generic /[ \t]*((\/\/)|(\/\*[ \t]*\*\/))?[ \t]*/
Map empty lines, including C-style empty comment
let empty_dos = [ del /[ \t]*#?[ \t]*/ "" . del /\r?\n/ "\n" ]
test Xml.empty_element get empty1 = { "a" = "#empty" }
let empty_generic (r:regexp) = [ del r "" . del_str "\n" ]
A generic definition of empty Map empty lines, including empty comments
let empty_generic_re = /[ \t]*#?[ \t]*/
let empty1 = "<a/>"
let empty2 = "<a foo=\"bar\"/>"
let empty3 = "<a foo=\"bar\"></a>\n"
let empty4 = "<a foo=\"bar\" far=\"baz\"/>"
let encrypt = tag "encrypt"
encrypt tag
let entries = (empty | comment | entry)*
entries are either comments/empty lines or entries
let entries_re = /([oO]ption|[sS]creen|[iI]nput[dD]evice|[dD]river|[sS]ub[sS]ection|[dD]isplay|[iI]dentifier|[vV]ideo[rR]am|[dD]efault[dD]epth|[dD]evice)/
This is a list of all patterns which have specific handlers, and should therefore not be matched by the generic handler
let entry = IniFile.indented_entry entry_re sep comment
let entry = [ access . colon . user_list . (except user_list)? . colon . origin_list . (except origin_list)? . Util.eol ]
A valid entry line Definition:
let entry = [ label "entry" . Util.indent . ( period | period_name ) . Sep.space . delay . Sep.space . job_identifier . Sep.space . store Rx.space_in . Util.eol ]
An anacrontab entry
let entry = IniFile.entry Rx.word sep comment
let rec entry_noeol = let value = Util.del_str "\"" . store /[^"\n]+/ . del /";?/ "\";" in let opt_eol = del /[ \t\n]*/ "\n" in let long_eol = del /[ \t]*\n+/ "\n" in let list_elem = [ opt_eol . label "@elem" . value ] in let eol_comment = del /([ \t\n]*\n)?/ "" . comment in [ key name_re . Sep.space . value ] | [ key name_re . del /[ \t\n]*\{/ " {" . ( (opt_eol . entry_noeol) | list_elem | eol_comment )* . del /[ \t\n]*\};?/ "\n};" ] | [ key name_re . Util.del_str "::" . entry_noeol ]
An apt.conf entry, recursive
let entry = [ seq "entry" . entry_mkey . Util.del_ws_tab . entry_options? . ( entry_locations | entry_multimounts ) . Util.eol ]
A single map entry from start to finish, including multi-mounts
let entry = [ label "entry" . store no_semicolon . (semicol . field_no_colon "provider")? . colon . field_int "frequency" . colon . field_word "parameter" . colon . field_word "signal_source" . colon . field_int "symbol_rate" . colon . vpid . colon . apid . colon . tpid . colon . caid . colon . field_int "sid" . colon . field_int "nid" . colon . field_int "tid" . colon . field_int "rid" . eol ]
let entry = [ label "entry" . indent . prefix? . ( time | schedule ) . sep_spc . user . sep_spc . store Rx.space_in . eol ]
A crontab entry
let entry = [ label "bookmark" . store Rx.no_spaces . (Sep.space . [ label "label" . store Rx.space_in ])? . Util.eol ]
let entry = bool ("multi"|"nospoof"|"spoofalert"|"reorder") | bool_warn "spoof" | list "order" "order" | trim
let entry = [ seq "line" . daemon_list . (except daemon_list)? . colon . client_list . (except client_list)? . ( (colon . option)+ | (colon . shell_command)? ) . Util.eol ]
let entry (kw:regexp) (sep:lens) (comment:lens) = [ key kw . sep . sto_to_comment? . (comment|eol) ] | comment
Generic INI File entry
let entry = let mapping = [ label "mapping" . store Rx.word ] in [ label "entry" . Util.del_str "\"" . store /[^" \t\n]+/ . Util.del_str "\":" . Sep.space . mapping . Util.eol ]
An inputrc mapping entry
let entry (kw:regexp) (lns:lens) = Build.key_value_line kw sep lns
A generic entry for lens lns
let entry = alias | options | kv_line_command /install|remove/ | blacklist | config | softdep
let entry = [ seq "network" . indent . [ label "network" . store Rx.ipv4 ] . sep . [ label "netmask" . store Rx.ipv4 ] . comment_or_eol ]
Network / netmask line
let entry = let alias = [ seq "alias" . store Rx.word ] in [ seq "network" . counter "alias" . [ label "name" . store Rx.word ] . [ Sep.space . label "number" . store ipv4 ] . [ Sep.space . label "aliases" . Build.opt_list alias Sep.space ]? . (Util.eol|Util.comment) ]
let entry = entry_gen number | entry_gen word_opt_quot | entry_gen word_quot (* anything else *)
let entry = let protocol = [ label "protocol" . store protoname ] in let number = [ label "number" . store Rx.integer ] in let alias = [ label "alias" . store protoname ] in [ seq "protocol" . protocol . Sep.space . number . (Sep.space . Build.opt_list alias Sep.space)? . Util.comment_or_eol ]
let entry = Build.key_value_line Rx.word Sep.equal (store Rx.space_in)
let entry = [ key "allow" . Sep.space . condition_list . Sep.space . by . Util.eol ]
let entry = nameserver | domain | search | sortlist | options
let entry = IniFile.entry (IniFile.entry_re - "description") sep comment | description
An IniFile.entry, or description
let entry = Build.key_value Rx.word Sep.space_equal (store to_comment_re . (Util.eol|Util.comment_eol))
let entry = let username = [ label "username" . store Rx.no_spaces ] in let usernames = Build.opt_list username Sep.space in Build.key_value_line Rx.word Sep.space_equal usernames
let entry = let comma_list_re = "password-stores" in let space_list_re = "global-ignores" | "preserved-conflict-file-exts" in let std_re = /[^ \t\n\/=#]+/ - comma_list_re - space_list_re in IniFile.entry_multiline_nocomment std_re sep comment | IniFile.entry_list_nocomment comma_list_re sep Rx.word Sep.comma | IniFile.entry_list_nocomment space_list_re sep Rx.no_spaces (del /\n?[ \t]+/ " ")
let entry = [ label "entry" . selectors . sep_tab . [ label "action" . action ] . eol ]
an entry contains selectors and an action
let entry = entry_single | entry_multi | entry_command | entry_env | comment
An IniFile.entry
test Reprepro_Uploaders.entry get "allow * by anybody\n" = { "allow" = "*" { "by" = "anybody" } }
A star condition gets mapped as direct value of the “allow” node.
let entry = [ seq "entry" . store key_re . Sep.equal . ( multi_entry | single_entry )? . Util.eol ]
let entry = Build.key_value_line Rx.word Sep.space_equal Quote.double_opt
subversion doesn’t support indented entries
let entry_ace = IniFile.entry IniFile.entry_re sep_ace comment_ace
let entry_acf = IniFile.entry IniFile.entry_re sep_acf comment_acf
let entry_ade = IniFile.entry IniFile.entry_re sep_ade comment_ade
let entry_adf = IniFile.entry IniFile.entry_re sep_adf comment_adf
let entry_bce = IniFile.entry IniFile.entry_re sep_bce comment_bce
let entry_bcf = IniFile.entry IniFile.entry_re sep_bcf comment_bcf
let entry_bde = IniFile.entry IniFile.entry_re sep_bde comment_bde
let entry_bdf = IniFile.entry IniFile.entry_re sep_bdf comment_bdf
Entry that takes a space separated set of values (the default)
let entry_command_flags = let exit = [ label "ignoreexit" . Util.del_str "-" ] in let arg0 = [ label "arg0" . Util.del_str "@" ] in exit? . arg0?
Exec* flags “@” and “-”.
let entry_command_kw = /Exec[A-Za-z][A-Za-z0-9._-]+/
let entry_env = let envkv = [ key env_key . Util.del_str "=" . ( sto_value )? ] in entry_fn entry_env_kw ( Build.opt_list envkv value_sep )
Entry that takes a space separated set of ENV=value key/value pairs
let entry_env_kw = "Environment"
let entry_fn (kw:regexp) (val:lens) = [ key kw . sep . val . (comment|eol) ]
Prototype for our various key=value lines, with optional comment
let entry_gen (lns:lens) = Util.indent . Build.key_value_line_comment Rx.word sep lns Util.comment_eol
Builder to construct entries
let entry_generic = [ indent . key generic_entry_re . sep_spc . store to_eol . eol ]
An entry without a specific handler.
let entry_host = [ label "host" . store hostname . ( Util.del_str "(" . [ label "weight" . store weight ] . Util.del_str ")" )? ]
Host component with optional weight of an entry location
let entry_int (canon:string) (re:regexp) = [ indent . del re canon . label canon . sep_spc . store int . eol ]
This matches an entry which takes a single integer for an argument
Key for a map entry
let entry_key = Rx.word
The key for an entry in the config file
let entry_list (kw:regexp) (sep:lens) (sto:regexp) (list_sep:lens) (comment:lens) = let list = counter "elem" . Build.opt_list [ seq "elem" . store sto ] list_sep in Build.key_value_line_comment kw sep (Sep.opt_space . list) comment
Generic INI File list entry
let entry_list_nocomment (kw:regexp) (sep:lens) (sto:regexp) (list_sep:lens) = let list = counter "elem" . Build.opt_list [ seq "elem" . store sto ] list_sep in Build.key_value_line kw sep (Sep.opt_space . list)
Generic INI File list entry without an end-of-line comment
let entry_location = ( entry_host . ( Sep.comma . entry_host )* )? . Sep.colon . entry_path
A single location with one or more hosts, and one path
let entry_locations = [ label "location" . counter "location" . [ seq "location" . entry_location ] . ( [ Util.del_ws_spc . seq "location" . entry_location ] )* ]
Multiple locations (each with one or more hosts), separated by spaces
let entry_multi_kw = /[A-Za-z][A-Za-z0-9._-]+/ - entry_single_kw - entry_command_kw - entry_env_kw
let entry_multiline (kw:regexp) (sep:lens) (comment:lens) = [ key kw . sep . sto_multiline? . (comment|eol) ] | comment
Generic multiline INI File entry
let entry_multiline_nocomment (kw:regexp) (sep:lens) (comment:lens) = [ key kw . sep . sto_multiline_nocomment? . eol ] | comment
Generic multiline INI File entry without an end-of-line comment
let entry_multimount = entry_mkey . Util.del_ws_tab . entry_options? . entry_locations
Parses one of many mountpoints given for a multimount line
let entry_multimount_sep = del /[ \t]+(\\\\[ \t]*\n[ \t]+)?/ " "
Separator for multimount entries, permits line spanning with “\”
let entry_multimounts = [ label "mount" . counter "mount" . [ seq "mount" . entry_multimount ] . ( [ entry_multimount_sep . seq "mount" . entry_multimount ] )* ]
Parses multiple mountpoints given on an entry line
let entry_options = Util.del_str "-" . comma_sep_list "opt" . Util.del_ws_tab
let entry_or_comment = entry | comment
let entry_path = [ label "path" . store path ]
Path component of an entry location
let entry_prefix = /-/
let entry_re = /path|allow|deny/
Regexp for possible entry keyword (path, allow, deny)
let entry_re = ( /[A-Za-z][A-Za-z0-9._-]+/ )
Default regexp for entry keyword
let entry_re = /[A-Za-z][A-Za-z0-9._\(\) \t-]+/
let entry_rgb (canon:string) (re:regexp) = [ indent . del re canon . label canon . [ label "red" . sep_spc . store int ] . [ label "green" . sep_spc . store int ] . [ label "blue" . sep_spc . store int ] . eol ]
This matches an entry which takes 3 integers as arguments representing red, green and blue components
let entry_single = entry_fn entry_single_kw [ label "value" . sto_value_single ]?
Entry that takes a single value containing spaces
let entry_single_kw = "Description"
let entry_sto (kw:regexp) (val:regexp) = entry kw (store val)
Store a regexp as entry value
let entry_str (canon:string) (re:regexp) = [ indent . del re canon . label canon . sep_spc . quoted_string_val . eol ]
This matches an entry which takes a single quoted string
let entry_value = /[A-Za-z0-9_.-:%]+/
The value for an entry may contain all sorts of things
let entry_value = [ label "value" . sto_value ]
Store a value that doesn’t contain spaces
let entry_xy (canon:string) (re:regexp) = [ indent . del re canon . label canon . [ label "x" . sep_spc . store int ] . [ label "y" . sep_spc . store int ] . eol ]
This matches an entry which takes 2 integers as arguments representing X and Y coordinates
let env = "[Service] Environment=LANG=C Environment=LANG=C FOO=BAR Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION= Environment=LANG=C\ FOO=BAR "
let env_key = /[A-Za-z0-9_]+(\[[0-9]+\])?/
let eol = Util.eol
let eol = Util.eol
let eol = Util.eol
An Util.eol
let eol = Util.eol
And Util.eol end of line
let eol = Util.eol
let eol = Util.eol
let eol = Util.eol
let eol = Util.eol
let eol = Util.eol
let eol = Util.eol
let eol = Util.eol
let eol = Util.eol
let eol = Util.eol
End of line, inherited from Util.eol
let eol = Util.eol
let eol = Util.del_str "\n"
Only eol, don’t include whitespace
let eol = del /[ \t]*(#)?[ \t]*\n/ "\n"
let eol = Util.eol
let eol = Util.eol
let eol = Util.eol
let eol = del /[ \t]*\n/ "\n"
Delete end of line, including optional trailing whitespace
let eol = Util.eol
let eq = dels "="
let equal = Sep.equal
let equal = del /[ \t]*=[ \t]*/ " = "
let equal = Util.del_str "="
Parses Erlang configuration files
The Test_Access file contains various examples and tests.
The Test_Aliases file contains various examples and tests.
The Test_Anacron file contains various examples and tests.
The Test_Approx file contains various examples and tests.
The Test_Apt_Update_Manager file contains various examples and tests.
The Test_Authorized_Keys file contains various examples and tests.
The Test_Automaster file contains various examples and tests.
The Test_Automounter file contains various examples and tests.
The Test_Cachefilesd file contains various examples and tests.
The Test_Channels file contains various examples and tests.
The Test_Collectd file contains various examples and tests.
The Test_Cups file contains various examples and tests.
The Test_Erlang file contains various examples and tests.
The Test_FAI_DiskConfig file contains various examples and tests.
The Test_Fonts file contains various examples and tests.
The Test_Fuse file contains various examples and tests.
The Test_GtkBookmarks file contains various examples and tests.
The Test_IniFile file contains various examples and tests.
The Test_Inputrc file contains various examples and tests.
The Test_Keepalived file contains various examples and tests.
The Test_NetworkManager file contains various examples and tests.
The Test_Postfix_Transport file contains various examples and tests.
The Test_Postfix_Virtual file contains various examples and tests.
The Test_Postgresql file contains various examples and tests.
The Test_Protocols file contains various examples and tests.
The Test_Puppet_Auth file contains various examples and tests.
The Test_Qpid file contains various examples and tests.
The Test_Quote file contains various examples and tests.
The Test_Rabbitmq file contains various examples and tests.
The Test_Reprepro_Uploaders file contains various examples and tests.
The Test_Rsyslog file contains various examples and tests.
The Test_Simplelines file contains various examples and tests.
The Test_Simplevars file contains various examples and tests.
The Test_SmbUsers file contains various examples and tests.
The Test_Subversion file contains various examples and tests.
The Test_Sysctl file contains various examples and tests.
The Test_Up2date file contains various examples and tests.
The Test_Vfstab file contains various examples and tests.
The Test_VMware_Config file contains various examples and tests.
let except (lns:lens) = [ label "except" . Sep.space . del /[Ee][Xx][Cc][Ee][Pp][Tt]/ "EXCEPT" . Sep.space . lns ]
The except operator makes it possible to write very compact rules.
let except (lns:lens) = [ label "except" . Sep.space . del /except/i "EXCEPT" . Sep.space . lns ]
The except operator makes it possible to write very compact rules.
let exec = "[Service] ExecStart=/bin/ls ExecReload=/bin/kill -USR1 $MAINPID ExecStart=/sbin/rpcbind -w ExecStartPost=/bin/systemctl disable firstboot-graphical.service firstboot-text.service ExecStartPre=/sbin/modprobe -qa $SUPPORTED_DRIVERS ExecStop=/usr/sbin/aiccu stop ExecStopPost=-/bin/systemctl poweroff ExecStopPost=@/bin/systemctl poweroff ExecStopPost=-@/bin/systemctl poweroff ExecStopPost=/bin/systemctl\ poweroff "
Parses /etc/exports
Close