A | |
alpha, Cron | |
alphanum, Cron | |
at, Syslog | |
B | |
bang, Syslog | |
C | |
colon | |
comma | |
comment | |
comment_default, IniFile | |
comment_re, IniFile | |
comparison, Syslog | |
controller, cgrules | |
ctrl_key, cgrules | |
ctrl_value, cgrules | |
D | |
del_opt_ws, Util | |
del_str, Util | |
del_ws, Util | |
del_ws_spc, Util | |
del_ws_tab, Util | |
dot, Syslog | |
E | |
email_addr, Rx | |
empty | |
empty line, Access | |
entries_re, Xorg | |
entry_re | |
eol | |
F | |
file_r, Syslog | |
filter | |
fspath | |
G | |
generic_entry_re, Xorg | |
group_record, cgrules | |
I | |
indent | |
int, Xorg | |
ipaddr, Pg_Hba | |
L | |
loghost_r, Syslog | |
N | |
name, cgrules | |
num, Cron | |
O | |
opt_hash, Syslog | |
opt_plus, Syslog | |
optval | |
P | |
pipe, Syslog | |
plus, Syslog | |
Q | |
quoted_string_val, Xorg | |
R | |
record_label_re, IniFile | |
record_re, IniFile | |
remtypes, Pg_Hba |
let alpha = /[A-Za-z]{3}/
let alphanum = num | alpha
Deletes a at and default to it
let at = Util.del_str "@"
Deletes a bang and default to it
let bang = Util.del_str "!"
this is the standard field separator “ : “
let colon = Sep.space . Sep.colon . Sep.space
Deletes a colon and default to it
let colon = sep_tab_opt . Util.del_str ":" . sep_tab_opt
let comma = Sep.comma
Deletes a comma and default to it
let comma = sep_tab_opt . Util.del_str "," . sep_tab_opt
let comment = Util.comment
let comment = Util.comment
let comment = Util.comment
let comment = Util.comment
let comment = Util.comment
Default value for comment pattern
let comment_default = ";"
Default regexp for comment pattern
let comment_re = /[;#]/
a comparison is an optional !
let comparison = /( !|[<=>]+|![<=>]+ )/
let controller = ws . [ key ctrl_key . ws . store ctrl_value ]
let ctrl_key = /[^ \t\n\/]+/
let ctrl_value = /[^ \t\n]+/
Delete optional whitespace
let del_opt_ws = del /[ \t]*/
Delete a string and default to it
let del_str ( s:string ) = del s s
Delete mandatory whitespace
let del_ws = del /[ \t]+/
Delete mandatory whitespace, default to single space
let del_ws_spc = del_ws " "
Delete mandatory whitespace, default to single tab
let del_ws_tab = del_ws "\t"
Deletes a dot and default to it
let dot = Util.del_str "."
To be refined
let email_addr = /[A-Za-z0-9_\+\.-]+@[A-Za-z0-9_\.-]+/
let empty = Util.empty
let empty = Util.empty
let empty = Util.empty
let empty = Util.empty
let empty = Util.empty
This is a list of all patterns which have specific handlers, and should therefore not be matched by the generic handler
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 )/
Regexp for possible entry keyword (path, allow, deny)
let entry_re = /path|allow|deny/
Default regexp for entry keyword
let entry_re = ( /[A-Za-z][A-Za-z0-9\._-]+/ )
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 = del /[ \t]*( # )?[ \t]*\n/ "\n"
let eol = del /[ \t]*\n/ "\n"
let eol = Util.eol
Delete end of line, including optional trailing whitespace
let eol = del /[ \t]*\n/ "\n"
let eol = Util.eol
a file begins with a / and get almost anything else after
let file_r = /\/[^ \t\n]+/
let fspath = Rx.fspath
let generic_entry_re = /[^# \t\n\/]+/ - entries_re
let group_record = generic_record "group" ( Util.del_str "@" . store name )
let indent = Util.indent
let indent = del /[ \t]*/ ""
Delete indentation, including leading whitespace
let indent = del /[ \t]*/ ""
let indent = Util.indent
let int = /[0-9]+/
CIDR or ip+netmask
let ipaddr = /[0-9a-fA-F:\.]+( \/[0-9]+|[ \t]+[0-9\.]+ )/
Matches a hostname, that is labels speparated by dots, labels can’t start or end with a “-”.
let loghost_r = /[a-zA-Z0-9]( [a-zA-Z0-9-]*[a-zA-Z0-9] )?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*/
let name = /[^@%\# \t\n][^ \t\n]*/
let num = /[0-9\*][0-9\/,-\*]*/
deletes an optional # sign
let opt_hash = del /#?/ ""
deletes an optional + sign
let opt_plus = del /\+?/ ""
let optval = /[A-Za-z0-9_.:-]+/
Deletes a pipe and default to it
let pipe = Util.del_str "|"
Deletes a plus and default to it
let plus = Util.del_str "+"
let quoted_string_val = del "\"" "\"" . store /[^"\n]+/ . del "\"" "\""
Default regexp for title_label keyword pattern
let record_label_re = /[^]\n]+/
Default regexp for title keyword pattern
let record_re = ( /[^]\n\/]+/ - /#comment/ )
non-local connection types
let remtypes = "host" | "hostssl" | "hostnossl"