Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 5 Dec 2018 20:07:04 +0100
From: Solar Designer <>
Subject: Re: Quotation character in preprocessor

On Wed, Dec 05, 2018 at 06:49:00PM +0000, oayz wrote:
>   I need a rule with quotation mark. This rule works fine:
> : $[."]
> This obviously doesn't (quote inside quotes):
> : Az"[."]"

You can change this line to e.g.:


which the preprocessor expands under-the-hood into two rules:


Of course, there's no reason to use the "A" command for just one
character, but I assume you gave this as an example, and your actual use
is with longer strings.

> So I tried usual "escape" character, still getting "invalid rule":
> : Az"[.\"]"
> I think it should work - a bug?

No, and no.  The quote character is just a character you provide to the
"A" command telling it that you'll terminate the string with that
character.  It is not special to the preprocessor, so no reason to
escape it for the preprocessor.  In your case, the line expanded to:


where the second expanded rule is invalid: it appends an empty string
and is followed by an extra quote character in place where the parser
expects a command character.  Luckily, there's no command of that name,
so you get an error reported.


Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.