Re: Two questions about scfg

Message ID
DKIM signature
Download raw message
(CC'ing my public inbox for archive purposes.)

On Monday, January 2nd, 2023 at 20:12, Daniele Parisi <danieleparisi@mailfence.com> wrote:

> I'm writing directly to you because I'm not sure where else to direct this. I
> am trying to write a scfg format[1] parser and I have two questions about it:
> - The spec says that an atom can contain an escape pair but this does not seem
> to be accepted in the libscfg code. Is this a spec or implementation error?

Indeed, sounds like a libscfg bug.

> - It's not specified what meaning to give an escape pair. Reading the libscfg it
> seems that you can only escape the literal character that follows the \, and
> so there is no way to insert a newline or other control characters, for
> example with \n or \r. Just wanted to make sure if this is what intended for
> the format.

Hm yeah that's a good question. The original intention was to behave
like POSIX sh... And POSIX sh interprets "\n" as "n", not a literal
newline. POSIX sh does allow "\" followed by a literal newline. I don't
think we support this at the moment due to the way tokens are split...
Reply to thread Export thread (mbox)