RE: [sv-bc] Macro mantis proposals 1397 & 1478

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Thu Dec 06 2007 - 00:31:42 PST
Regarding 1397, I agree that your proposal looks like it would solve the
problem, at the cost of changing the presence of newlines in expanded
text, which would change line numbers. Alternately, a more conservative
approach could point to 5.9 and point out that if a macro definition
contains a string literal with a backslash-newline, they both disappear,
so that both the string literal and the macro definition continue.
 
Thanks,
Shalom


________________________________

	From: owner-sv-bc@server.eda.org
[mailto:owner-sv-bc@server.eda.org] On Behalf Of Alsop, Thomas R
	Sent: Thursday, December 06, 2007 3:47 AM
	To: sv-bc@server.eda.org
	Subject: [sv-bc] Macro mantis proposals 1397 & 1478
	
	

	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 <http://www.mailscanner.info/>
, and is 
	believed to be clean. 

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Dec 6 00:34:39 2007

This archive was generated by hypermail 2.1.8 : Thu Dec 06 2007 - 00:35:28 PST