1 (* Parsing /etc/hosts *)
6 let word = /[^# \n\t]+/
7 let record = [ seq "host" . Util.indent .
8 [ label "ipaddr" . store word ] . Sep.tab .
9 [ label "canonical" . store word ] .
10 [ label "alias" . Sep.space . store word ]*
11 . Util.comment_or_eol ]
13 let lns = ( Util.empty | Util.comment | record ) *
15 let xfm = transform lns (incl "/etc/hosts")