     {
         { [ "nameserver" ?head ] [ parse-nameserver ] }
         { [ "domain" ?head ] [ parse-domain ] }
+        { [ "lookup" ?head ] [ parse-lookup ] }
         { [ "search" ?head ] [ parse-search ] }
         { [ "sortlist" ?head ] [ parse-sortlist ] }
         { [ "options" ?head ] [ parse-option ] }


TUPLE: options
debug?
{ ndots integer initial: 1 }
{ timeout integer initial: 5 }
{ attempts integer initial: 2 }
rotate? no-check-names? inet6? ;

CONSTRUCTOR: options ( -- options ) ;

TUPLE: resolv.conf nameserver domain search sortlist options ;

CONSTRUCTOR: resolv.conf ( -- resolv.conf )
    V{ } clone >>nameserver
    V{ } clone >>domain
    V{ } clone >>search
    V{ } clone >>sortlist
    <options> >>options ;

<PRIVATE


: parse-domain ( resolv.conf string -- resolv.conf )
    split-line domain>> push-all ;

: parse-lookup ( resolv.conf string -- resolv.conf )
    split-line lookup>> push-all ;

: parse-search ( resolv.conf string -- resolv.conf )
    split-line search>> push-all ;
