T | |
tab, Sep | |
tag, FAI_DiskConfig | |
target, Crypttab | |
tcp_check, Test_Keepalived | |
the valid values for schedules, Cron | |
title_ace, Test_IniFile | |
title_acf, Test_IniFile | |
title_ade, Test_IniFile | |
title_adf, Test_IniFile | |
title_bce, Test_IniFile | |
title_bcf, Test_IniFile | |
title_bde, Test_IniFile | |
title_bdf, Test_IniFile | |
to_com_chars, Sudoers | |
to_com_dquot, Sudoers | |
to_comment_re | |
to_eol, Xorg | |
token, Syslog | |
type_label_lv, FAI_DiskConfig | |
U | |
ul1, Test_Xml | |
unit, Test_Systemd | |
user_record, cgrules | |
V | |
value, Dovecot | |
value_cmd_re, Systemd | |
value_re | |
value_sep, Systemd | |
value_single_re, Systemd | |
vg_option, FAI_DiskConfig | |
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 | |
W | |
with_spaces, Test_FAI_DiskConfig | |
word | |
word_opt_quot_re, Postgresql | |
word_slash, Keepalived | |
ws, cgrules | |
ws_sep, Hosts_Access |
Deletes a Rx.space and default to a tab
let tab = del Rx.space "\t"
A generic tag beginning with a colon
let tag (re:regexp) = [ Util.del_str ":" . key re ]
let target = Rx.device_name
An example of a TCP health checker
let tcp_check = "virtual_server 192.168.1.11 22 { real_server 10.20.40.10 22 { TCP_CHECK { connect_timeout 3 connect_port 22 bindto 192.168.1.1 } } } " test Keepalived.lns get tcp_check = { "virtual_server" { "ip" = "192.168.1.11" } { "port" = "22" } { "real_server" { "ip" = "10.20.40.10" } { "port" = "22" } { "TCP_CHECK" { "connect_timeout" = "3" } { "connect_port" = "22" } { "bindto" = "192.168.1.1" } } } }
let title_ace = IniFile.title IniFile.record_re
let title_acf = IniFile.title IniFile.record_re
let title_ade = IniFile.title IniFile.record_re
let title_adf = IniFile.title IniFile.record_re
let title_bce = IniFile.title IniFile.record_re
let title_bcf = IniFile.title IniFile.record_re
let title_bde = IniFile.title IniFile.record_re
let title_bdf = IniFile.title IniFile.record_re
let to_com_chars = /[^",=#() \t\n\\]+/ (* " relax emacs *)
let to_com_dquot = /"[^",=#()\n\\]+"/ (* " relax emacs *)
Regex until comment
let to_comment_re = /[^";# \t\n][^";#\n]*[^";# \t\n]|[^";# \t\n]/
The regexp to match the value
let to_comment_re = let to_comment_squote = /'[^\n']*'/ in let to_comment_dquote = /"[^\n"]*"/ in let to_comment_noquote = /[^\n \t'"#][^\n#]*[^\n \t#]|[^\n \t'"#]/ in to_comment_squote | to_comment_dquote | to_comment_noquote
Match everything from here to eol, cropping whitespace at both ends
let to_eol = /[^ \t\n](.*[^ \t\n])?/
alphanum or “*”
let token = /([A-Za-z0-9]+|\*)/
let type_label_lv = label "lv" . [ label "vg" . store (/[^# \t\n-]+/ - "raw") ] . Util.del_str "-" . [ label "name" . store /[^ \t\n]+/ ]
let ul1 = " <ul> <li>test1</li> <li>test2</li> <li>test3</li> <li>test4</li> </ul> " test Xml.doc get ul1 = { "ul" { "#text" = " " } { "li" { "#text" = "test1" } } { "#text" = " " } { "li" { "#text" = "test2" } } { "#text" = " " } { "li" { "#text" = "test3" } } { "#text" = " " } { "li" { "#text" = "test4" } } }
let unit = "# This file is part of systemd. # # See systemd.special(7) for details .include /etc/example [Unit] Description=Locale Service # Add another file .include /etc/example [Service] ExecStart=/lib/systemd/systemd-localed Type=dbus BusName=org.freedesktop.locale1 CapabilityBoundingSet= "
let user_record = generic_record "user" (store name)
Match any value after “ =”.
let value = any . (Rx.space . any)*
let value_cmd_re = /[^#@ \t\n\\-][^#@ \t\n\\-][^# \t\n\\]*/
let value_re = /[^ \t\n](.*[^ \t\n])?/
let value_re = /[^ \t\n;][^\n;]*[^ \t\n;]|[^ \t\n;]/
Multi-value entries separated by whitespace or backslash and newline
let value_sep = del /[ \t]+|[ \t]*\\\\[ \t]*\n[ \t]*/ " "
let value_single_re = /[^# \t\n\\][^#\n\\]*[^# \t\n\\]|[^# \t\n\\]/
An option for volume_vg
let vg_option = [ key "pvcreateopts" . Util.del_str "=\"" . store /[^"\n]*/ . Util.del_str "\"" ]
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
A succesion of volumes and comments
let volume_or_comment (vol:lens) = (vol|empty|comment)* . vol
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 with_spaces = "disk_config disk2 raw-disk - 0 - - "
let word = /[^|", \t\n]+/
let word = Rx.word
let word = Rx.word
let word = Rx.word
An alphanumeric string
let word = /[A-Za-z0-9_.-]+/
our version can’t start with [_.-] because it would mess up the grammar
let word = /[A-Za-z0-9][A-Za-z0-9_.-]*/
Strings that don’t require quotes
let word_opt_quot_re = /[A-Za-z][A-Za-z0-9_]*/
let word_slash = word | "/"
let ws = del /[ \t]+/ " "
let ws_sep = / +/