[sv-bc] Macro mantis proposals 1397 & 1478

From: Alsop, Thomas R <thomas.r.alsop_at_.....>
Date: Wed Dec 05 2007 - 17:47:22 PST
Hi,

 

There are 3 different mantis items that I know of that address this one
paragraph in 21.5.1 `define.  I am working on Mantis items 1397 and 1478
now and just want to give everyone a heads up on the direction I am
taking thus far.

 

Draft4 text:

 

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).

 

Mantis 1339 has been approved which adds the last sentence below:

 

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). Any
white space characters at the beginning or end of the macro text shall
be removed.

 

I am working on a proposal for Mantis issue 1397 - "LRM is unclear about
multi-line string literal in text macro".  Basically I am taking a very
clean approach to resolving this issue by stating that both newlines and
the escaped character are removed from the replaced macro text.  This
means that if anyone were to look at the replaced text, it's all going
to be on the same line.  I think it would be very rare or unusual that
anyone would do this. Shalom says he has done this on occasion, but I
think that proves my point:-):-) This change in the LRM implies that
both a string literal and the macro text continue on the next line,
which makes for a clean easy solution.

 

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 and the backslash shall both be removed
in the expanded macro. replaced in the expanded macro with a newline
(but without the preceding backslash character).  

 

I am also working on a proposal for Mantis issue 1478 - "nested macro
definitions".  Notice that I am adding "multi-line macro" so I can use
it further on in the paragraph.  I don't know if we already have another
name for this.  Also, I am not sure if I have to define "embedded" or if
that is understood. I am also wondering if I should mention anything
about the recursiveness of embedded macros.  I think this is mentioned
somewhere else.

 

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 (i.e. a multi-line macro), 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). A multi-line macro may have an embedded macro, however the
backslash continues the multi-line macro and not the embedded macro.  

 

If we combine all these Mantis items together we end up with the
following.  Let me know if this is going in the right direction.  

 

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 (i.e. a multi-line macro), 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 and the backslash
shall both be removed in the expanded macro. replaced in the expanded
macro with a newline (but without the preceding backslash character).  A
multi-line macro may have an embedded macro, however the backslash
continues the multi-line macro and not the embedded macro.  Any white
space characters at the beginning or end of the macro text shall be
removed.

 

Thanks, -Tom

 

 

 

 

 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Dec 5 17:48:18 2007

This archive was generated by hypermail 2.1.8 : Wed Dec 05 2007 - 17:48:49 PST