"options" "{" optlist "}" ";"
"source" <srcname> "{" srclist "}" ";"
"filter" <filname> "{" fillist "}" ";"
"destination" <destname> "{" destlist "}" ";"
"log" "{" logact "}" ";"

optlist ::= option [ optlist ]
option ::= syncopt ";" | markopt ";" | hash ";" | diropt ";" | logdir ";" |
	   chroot ";"
syncopt ::= "sync" <syncrate>
markopt ::= "mark" <markfreq>
diropt ::= "directory" <dirname>
hash ::= "hash" "{" hashlist "}" ";"
hashlist ::= hashopt [ hashlist ]
hashopt ::= hashdir ";" | algo ";"
hashdir ::= "directory" <dirname>
chroot ::= "chroot" <dirname>
logdir ::= "logdir" <dirname>
algo ::= "algorithm" <hash-algo>

srclist ::= source ";" [ srclist ] 
source ::= file | unix | inet
file ::= "file" <filename>
unix ::= "unix" <filename>
inet ::= protocol <address> "," <port>
protocol ::= "tcp" | "udp"

fillist ::= [ mod ] filter ";" [ fillist ]
mod ::= "!" | "not"
filter ::= facility | priority | facpri | wrapper | match
facility ::= "facility" <facname>
priority ::= "priority" pricompare
facpri ::= "facpri" <facname> "," pricompare
wrapper ::= <protocol> <netmask>
match ::= "match" <regex> | "match-file" <filename>

pricompare ::= [compare] <priname>
destlist ::= dest ";" [ destlist ]
dest ::= filesync | inet | unix | command | user
filesync ::= file [ sync ]
sync ::= "sync" <rate>
command ::= "|" <command>

logact ::= "source" <srcname> ";" [ filters ] "destination" <destname> ";"
filters ::= andlist
orlist ::= andlist ";" [ orlist ]
andlist ::= "filter" filnames
filnames ::= <filname> [ "," <filnames> ]
