INN config file parsing infrastructure
Russ Allbery
rra at stanford.edu
Mon May 1 00:03:35 UTC 2000
Marco d'Itri <md at linux.it> writes:
> On Apr 30, Russ Allbery <rra at stanford.edu> wrote:
>> quotes in the string and to continue lines. Note that something like:
>>
>> parameter: "first line\
>> second line"
>>
>> would result in a literal newline being part of the string assigned to
>> that parameter.
> I think this is confusing. This behaviour is very non intuitive, when
> UNIX programs implement \-escaping the \\n sequence is usually special
> cased.
This is a good point. On the other hand, I really don't want to get into
handling the full set of C backslash sequences, at least for right now
until we have some pressing need for them. INN doesn't really need the
ability to embed newlines in a string; shall we just say that escaped
newlines disappear completely like they do in C?
> Maybe C and C++ comments should be supported too, like BIND does. I
> think C comments are useful because they allow to quickly comment whole
> blocks.
I tend to use emacs, so I'm pretty used to just doing C-x r t # SPACE
ENTER. I'd rather avoid extra comment styles, at least for right now, to
try to keep the syntax as simple as possible.
> Other than these details, I think your proposal is very good. What about
> making a separate package with just this code for authors who may want
> to use it in their programs?
That's a good idea, and I'll want to use this parsing code in some other
projects of mine too. I'll look and see how difficult that will be to do.
--
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
More information about the inn-workers
mailing list