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
V
 val, LVM
 VALID EXAMPLES, Test_Tmpfiles
 valid_age, Test_Tmpfiles
 valid_age_tree, Test_Tmpfiles
 valid_base, Test_Tmpfiles
 valid_base_tree, Test_Tmpfiles
 valid_days, Test_Tmpfiles
 valid_days_tree, Test_Tmpfiles
 valid_second, Test_Tmpfiles
 valid_second_tree, Test_Tmpfiles
 valid_short_args, Test_Tmpfiles
 valid_short_args_tree, Test_Tmpfiles
 value
 value entries, Toml
 Value types, Erlang
 value_cmd_re, Systemd
 value_list
 value_re
 value_sep
 value_single_re, Systemd
 value_to_eol, Grub
 variable, Inputrc
 Variables, Desktop
 various macros, Syslog
 version_pin, AptPreferences
 Vfstab
 vg_option, FAI_DiskConfig
 videoram, Xorg
 virtual_server, Keepalived
 virtual_server_field, Keepalived
 virtual_server_group, Keepalived
 virtual_server_group_field, Keepalived
 volume
 volume_cryptsetup, FAI_DiskConfig
 volume_full, FAI_DiskConfig
 volume_lvm, FAI_DiskConfig
 volume_or_comment, FAI_DiskConfig
 volume_raid, FAI_DiskConfig
 volume_tmpfs, FAI_DiskConfig
 volume_vg, FAI_DiskConfig
 vpid, Channels
 VRRP CONFIGURATION, Keepalived
 vrrp_instance, Keepalived
 vrrp_instance_field, Keepalived
 vrrp_script, Keepalived
 vrrp_script_field, Keepalived
 vrrp_sync_group, Keepalived
 vrrp_sync_group_field, Keepalived
 vrrpd_conf, Keepalived
 VWware_Config
W
 weight, Automounter
 weight_re, Ntpd
 with_spaces, Test_FAI_DiskConfig
 word
 word_opt_quot, Postgresql
 word_opt_quot_re, Postgresql
 word_quot, Postgresql
 word_slash, Keepalived
 ws
 ws_or_eol, Xymon_Alerting
 ws_sep, Hosts_Access
X
 xchg
 xchgs
 xfm, GtkBookmarks
 Xinetd
 Xorg
 Xymon_Alerting
Y
 Yaml
let val = flat_literal | list
Any value that appears on the right hand side of an assignment
let valid_age = "v /var/tmp/js 4221 johnsmith - ~10d12h\n"
Example with a complex age.
let valid_age_tree = { "1" { "type" = "v" } { "path" = "/var/tmp/js" } { "mode" = "4221" } { "uid" = "johnsmith" } { "gid" = "-" } { "age" = "~10d12h" } }
Tree for valid_age
let valid_base = "H /var/tmp/js 0000 jonhsmith 60 1s foo\n"
A valid test to be re-used by the failure cases
let valid_base_tree = { "1" { "type" = "H" } { "path" = "/var/tmp/js" } { "mode" = "0000" } { "uid" = "jonhsmith" } { "gid" = "60" } { "age" = "1s" } { "argument" = "foo" } }
Tree for valid_base
let valid_days = "x /var/tmp/manu - jonhsmith - 9days\n"
Example with full age unit (plural)
let valid_days_tree = { "1" { "type" = "x" } { "path" = "/var/tmp/manu" } { "mode" = "-" } { "uid" = "jonhsmith" } { "gid" = "-" } { "age" = "9days" } }
Tree for valid_days
let valid_second = "p+ /var/tmp - jsmith - 0second\n"
Example with full age unit
let valid_second_tree = { "1" { "type" = "p+" } { "path" = "/var/tmp" } { "mode" = "-" } { "uid" = "jsmith" } { "gid" = "-" } { "age" = "0second" } }
Tree for valid_second
let valid_short_args = "h /var/log/journal - - - - C\nh /var/log/journal - - - - +C\n"
A short argument value example.
let valid_short_args_tree = { "1" { "type" = "h" } { "path" = "/var/log/journal" } { "mode" = "-" } { "uid" = "-" } { "gid" = "-" } { "age" = "-" } { "argument" = "C" } } { "2" { "type" = "h" } { "path" = "/var/log/journal" } { "mode" = "-" } { "uid" = "-" } { "gid" = "-" } { "age" = "-" } { "argument" = "+C" } }
Tree for valid_short_args
let value = any . (Rx.space . any)*
Match any value after “ =”.
let value (kw:regexp) (sto:lens) = [ rspace lbrace . key kw . lrspace comma . sto . lspace rbrace ]
A single value
let value_cmd_re = /[^#@ \t\n\\-][^#@ \t\n\\-][^# \t\n\\]*/
let value_list = Build.opt_list ([ label "value" . store destination]) comma
List of destinations
let value_list (kw:regexp) (sto:lens) = list kw (make_value sto)
A list of seq entries
let value_re = /[^ \t\n](.*[^ \t\n])?/
let value_re = /[^ \t\n;][^\n;]*[^ \t\n;]|[^ \t\n;]/
let value_sep (dflt:string) = del /[ \t]*[ \t=][ \t]*/ dflt
let value_sep = del /[ \t]+|[ \t]*\\\\[ \t]*\n[ \t]*/ " "
Multi-value entries separated by whitespace or backslash and newline
let value_single_re = /[^# \t\n\\][^#\n\\]*[^# \t\n\\]|[^# \t\n\\]/
let value_to_eol = store /[^= \t\n][^\n]*[^= \t\n]|[^= \t\n]/
let variable = [ Util.del_str "set" . Sep.space . key (Rx.word - "entry") . Sep.space . store Rx.word . Util.eol ]
An inputrc variable declaration
let version_pin = pin_gen "version"
Parses Solaris vfstab config file, based on Fstab lens
let vg_option = [ key "pvcreateopts" . Util.del_str "=\"" . store /[^"\n]*/ . Util.del_str "\"" ]
An option for volume_vg
let videoram = entry_int "VideoRam" /[vV]ideo[rR]am/
let virtual_server = named_block_arg "virtual_server" "ip" "port" virtual_server_field
let virtual_server_field = let num_re = "delay_loop" | "persistence_timeout" | "quorum" | "hysteresis" in let word_re = /lb_(algo|kind)/ | "nat_mask" | "protocol" | "persistence_granularity" | "virtualhost" in let flag_re = "ops" | "ha_suspend" | "alpha" | "omega" in let to_eol_re = /quorum_(up|down)/ in let ip_port_re = "sorry_server" in field num_re sto_num | field word_re sto_word | flag flag_re | field to_eol_re sto_to_eol | field ip_port_re ip_port | named_block_arg "real_server" "ip" "port" real_server_field
let virtual_server_group = named_block "virtual_server_group" virtual_server_group_field
let virtual_server_group_field = [ indent . label "vip" . [ ipaddr ] . sep_spc . [ label "port" . sto_num ] . comment_or_eol ]
test FAI_DiskConfig.volume get "primary /boot 20-100 ext3 rw\n" = { "primary" { "mountpoint" = "/boot" } { "size" = "20-100" } { "filesystem" = "ext3" } { "mount_options" { "1" = "rw" } } }
Test FAI_DiskConfig.volume
let volume_cryptsetup = volume_full (key ("swap"|"tmp"|"luks")) device
let volume_full (type:lens) (third_field:lens) =
let volume_lvm = volume_full type_label_lv size (* lvm logical volume: vg name and lv name *) | volume_vg
let volume_or_comment (vol:lens) = (vol|empty|comment)* . vol
A succesion of volumes and comments
let volume_raid = volume_full (key /raid[0156]/) disk_list (* raid level *)
let volume_tmpfs = [ key "tmpfs" . space . mountpoint .space . size . space . mount_options . (space . fs_options)? . eol ]
let volume_vg = [ key "vg" . space . name . space . disk . (space . vg_option)? . eol ]
let vpid = let codec = [ equal . label "codec" . store Rx.integer ] in let vpid_entry (lbl:string) = [ label lbl . store Rx.integer . codec? ] in vpid_entry "vpid" . ( plus . vpid_entry "vpid_pcr" )?
let vrrp_instance = named_block "vrrp_instance" vrrp_instance_field
let vrrp_instance_field = let word_re = "state" | "interface" | "lvs_sync_daemon_interface" in let num_re = "virtual_router_id" | "priority" | "advert_int" | /garp_master_(delay|repeat|refresh|refresh_repeat)/ in let to_eol_re = /notify(_master|_backup|_fault)?/ | /(mcast|unicast)_src_ip/ in let flag_re = "smtp_alert" | "nopreempt" | "ha_suspend" | "debug" | "use_vmac" | "vmac_xmit_base" | "native_ipv6" | "dont_track_primary" | "preempt_delay" in field word_re sto_word | field num_re sto_num | field to_eol_re sto_to_eol | flag flag_re | block "authentication" ( field /auth_(type|pass)/ sto_word ) | block "virtual_ipaddress" static_ipaddress_field | block /track_(interface|script)/ ( flag word ) | block "unicast_peer" static_ipaddress_field
let vrrp_script = named_block "vrrp_script" vrrp_script_field
let vrrp_script_field = let num_re = "interval" | "weight" | "fall" | "raise" in let to_eol_re = "script" in field to_eol_re sto_to_eol | field num_re sto_num
let vrrp_sync_group = named_block "vrrp_sync_group" vrrp_sync_group_field
let vrrp_sync_group_field = let to_eol_re = /notify(_master|_backup|_fault)?/ in let flag_re = "smtp_alert" in field to_eol_re sto_to_eol | flag flag_re | block "group" [ indent . key word . comment_or_eol ]
let vrrpd_conf = vrrp_sync_group | vrrp_instance | vrrp_script
contains subblocks of VRRP synchronization group(s) and VRRP instance(s)
Parses /etc/vmware/config
let weight = Rx.integer
let weight_re = /10|[1-9]/
value between 1 and 10
let with_spaces = "disk_config disk2 raw-disk - 0 - - "
let word = /[^|", \t\n]+/
let word = /[^][# \n\t]+/
let word = /[^#, \n\t\/]+/
let word = Rx.word
let word = Rx.word
let word = Rx.word
let word = Rx.word
let word = /[^#, \n\t\/]+/
let word = /[A-Za-z0-9_.:-]+/
let word = /[^=\n\t ]+/
let word = Rx.word
let word = store /[A-Za-z0-9@_\+\*.-]+/
let word = store /[A-Za-z0-9@\*.+=_-]+/
let word = /[A-Za-z0-9_.-]+/
An alphanumeric string
let word = /[A-Za-z0-9][A-Za-z0-9_.-]*/
our version can’t start with [_.-] because it would mess up the grammar
let word_opt_quot = Quote.do_squote_opt (store word_opt_quot_re)
Storing a word_opt_quot_re, with or without quotes
let word_opt_quot_re = /[A-Za-z][A-Za-z0-9_]*/
Strings that don’t require quotes
let word_quot = let esc_squot = /\\\\'/ in let no_quot = /[^#'\n]/ in let forbidden = word_opt_quot_re | number_re in let value = (no_quot|esc_squot)* - forbidden in Quote.do_squote (store value)
Anything other than word_opt_quot or number Quotes are mandatory
let word_slash = word | "/"
let ws = del /[ \t]+/ " "
let ws = Sep.space
let ws_or_eol = del /([ \t]+|[ \t]*\n[ \t]*)/ " "
let ws_sep = / +/
let xchg (m:regexp) (d:string) (l:string) = del m d . label l
Replace a pattern with a different label in the tree, thus emulating a key but allowing to replace the keyword with a different value than matched
let xchg = [ Build.xchg Rx.space " " "space" ]
let xchgs (m:string) (l:string) = xchg m m l
Same as xchg, but the pattern is the default string
let xchgs = [ Build.xchgs " " "space" ]
let xfm = transform lns (incl (Sys.getenv("HOME") . "/.gtk-bookmarks"))
Parses xinetd configuration files
Parses /etc/X11/xorg.conf
Parses xymon alerting files
Close