[sv-bc] Nested macro definitions

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Tue Apr 11 2006 - 00:11:10 PDT
  

Consider:

`define DFT_IGNORE(arg) \

  ... \

     `define ATTR \

  ... \

`endif

 

This is intended to be a 1-line text macro definition nested within a
multi-line macro definition.

The question here is whether the backslash after "`define ATTR" is
considered to be continuing the multi-line macro definition of
`DFT_IGNORE and "`define ATTR" is a 1-line macro, or whether the
backslash is considered to continue a multi-line macro definition of
ATTR.

We favor the 1st interpretation. We think this is supported by the text
in 1364-2005:

"The macro text can be any arbitrary text specified on the same line as
the text macro name. If more than one

line is necessary to specify the text, the newline shall be preceded by
a backslash (\). The first newline not

preceded by a backslash shall end the macro text. The newline preceded
by a backslash shall be replaced in

the expanded macro with a newline (but without the preceding backslash
character)."

 

This allows 1-line macro definitions to be embedded within multi-line
macro definitions, but does not allow to nest one multi-line macro
definition within another. That will in any case require an enhancement.

 

Shalom

 

 

Shalom Bresticker

Intel Jerusalem LAD DA

+972 2 589-6852

+972 54 721-1033

I don't represent Intel 

 



image001.gif
Received on Tue Apr 11 00:13:25 2006

This archive was generated by hypermail 2.1.8 : Tue Apr 11 2006 - 00:13:31 PDT