Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 May 2000 17:54:15 -0700
From:      "Brian O'Shea" <boshea@ricochet.net>
To:        A G F Keahan <ak@freenet.co.uk>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Generic config file parser?
Message-ID:  <20000528175415.Z337@beastie.localdomain>
In-Reply-To: <3931B325.BB166270@freenet.co.uk>; from A G F Keahan on Mon, May 29, 2000 at 02:00:37AM %2B0200
References:  <3931B325.BB166270@freenet.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, May 29, 2000 at 02:00:37AM +0200, A G F Keahan scribbled:
> 
> [SECTIONNAME1]
> wibble1 = blah
> wibble2 = 35
> wibble3 = "a string that has more than one word"
> ; this is a comment -- ignored
> wibble4 = 4.567e9
> 

<snip>

> 
> A trivial thing to write, and a very useful one -- surely it's been done
> before, no?

Not that I know of, but I havn't looked very far.

You are right, this could be done, but I wouldn't call it trivial.  I've
always come to the conclusion that the interface to something like this
would have to be kind of complex in order to keep it generic enough to
be really useful.  For instance, there isn't one standard Unix config
file format.  Do you want to build into it some of the different
[commonly used] formats?  If so, who defines these formats?  What kinds
of restrictions do you want to impose on it?  Do you want to enforce
unique identifiers?  Globally unique or just unique within a section?
Should this be configurable (with a config file?! ;) ?  Why not just use
xml?  (the token xml suggestion, sorry)

All of this is managable, it just seems like more trouble than it's
worth. (but if you write it, I'll probably use it! ;)

-brian

-- 
Brian O'Shea
boshea@ricochet.net


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000528175415.Z337>