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 |
let weight = Rx.integer
value between 1 and 10
let weight_re = /10|[1-9]/
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 = /[^=\n\t ]+/
let word = Rx.word
let word = store /[A-Za-z0-9@\*.+=-]+/
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_.-]*/
Storing a word_opt_quot_re, with or without quotes
let word_opt_quot = Quote.do_squote_opt (store word_opt_quot_re)
Strings that don’t require quotes
let word_opt_quot_re = /[A-Za-z][A-Za-z0-9_]*/
Anything other than word_opt_quot or number Quotes are mandatory
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)
let word_slash = word | "/"
let ws = del /[ \t]+/ " "
let ws = Sep.space
let ws_or_eol = del /([ \t]+|[ \t]*\n[ \t]*)/ " "
let ws_sep = / +/
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 (m:regexp) (d:string) (l:string) = del m d . label l
let xchg = [ Build.xchg Rx.space " " "space" ]
Same as xchg, but the pattern is the default string
let xchgs (m:string) (l:string) = xchg m m l
let xchgs = [ Build.xchgs " " "space" ]
let xfm = transform lns (incl (Sys.getenv("HOME") . "/.gtk-bookmarks"))