libconf-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libconf-dev] Re: shell template and whitespace around the =


From: dams
Subject: Re: [Libconf-dev] Re: shell template and whitespace around the =
Date: Sun, 15 Jun 2003 03:09:28 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

"Brian J. Murrell" <address@hidden> said:

> On Sat, 2003-06-14 at 20:18, address@hidden wrote:
>> 
>> hey! I'm glad you saw that, I was working on it :)
>
> :-)
>
>> I have commited a postfix libconf template, and a test suite. The postfix
>> template handles the multiline.
>
> I think I disagree that this condition should be handled by a file
> specific template.  I think it's a common rule (even if it's use is not
> exercised liberally) in "key = value" type files to allow the pair to
> occupy multiple lines if subsequent lines are prefixed with whitespace.
>
> This condition should be handled generically, not on a file-by-file
> basis, IMVHO.

Ok, why not. Actually I don't know that much what common rules are in the
key-value type files.

I would have tend to think that a more common rule would have been :

key = \
continuated line

but maybe I'm wrong.

If you are pretty sure that [ a line is the continuation of the previous if it
start with \s] is the common rule for keyvalue typed file, then I'll include
it.

What else than postfix uses this type of cnofig file?

>
>> I have asked a friend of mine about it, it seems that any \s character 
>> (space,
>> tab...) at the very beginning of the line means that it's the same atom.
>
> Right.  And I think it's common in "key = value" parsers to allow this.
>
> We should be aiming to keep the number of "file specific"
> templates/parsers down to the absolute minimum and leverage generic
> templates/parsers for as many files as we can.

That's right. Actually one day we'll have to figure out how to do tempalte
inheritance...

But before that, I'd like to implement validation, that is, being able to
specify that this atom value should be an IP address, and know whate to do if
it's not...

And also being able to see the comments in glueconf, systemconf, and in the
applications, not onlly in libconf.

and many other stuff :)

OK, so to sum up, you suggest to have the keyvalue template to handle multiline
like we descrived it, because it's a common rule, is that right?

-- 
dams




reply via email to

[Prev in Thread] Current Thread [Next in Thread]