Config parsing (2/4): Proposed syntax
Russ Allbery
rra at stanford.edu
Sat May 12 04:25:03 UTC 2001
Jeffrey M Vinocur <jeff at litech.org> writes:
> On 10 May 2001, Russ Allbery wrote:
>> Strings can be continued on multiple
>> lines by ending each line in a backslash.
>> [...]
>> In addition, any line beginning with "#", optionally preceeded by
>> whitespace, is regarded as a comment and discarded before parsing. The
>> line must begin with "#" (and optional whitespace); comments at the end of
>> lines aren't permitted. Comments are removed prior to parsing and
>> therefore aren't represented in the above grammar.
> Can we get a clarification on the interaction of these two? That is,
> should the line following a line which begins with "#" and ends with "\"
> be considered part of the comment or not.
> (I believe it should be 'no', but we probably should specify explicitly)
Answered in the other message, but this also pointed out that there was
another interaction that I wasn't specifying; the above language implies
that something like:
parameter: "value \
# hmm, what's this
rest of string"
has a comment in the middle of it, which I don't think is the right
approach. And in looking at solving that, I discovered that it actually
wasn't that bad to just put the comments directly into the grammar,
because it already so happened that comments were allowed exactly where
*WHITE was.
So I've now made that change in my version.
--
Russ Allbery (rra at stanford.edu) <http://www.eyrie.org/~eagle/>
More information about the inn-workers
mailing list