<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi all,<div><br></div><div><br></div><div>I'm looking for a way to write a macro that can distinguish string literals that do and don't come from at-expression boilerplate. For example, in the following code:</div><div><br></div><div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 13px;"> (define b "b")</span></font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 13px;"> @list{a @b c}</span></font></div><div><br></div><div><div>I'd like to be able to differentiate "a " and " c" from "b".</div><div><br></div><div><br></div><div>My motivation: I'd like to make the (xml ...) macro from Mirrors.plt at-expression-aware so that at-exps and s-exps are ampersand-encoded differently. In other words, s-expression "<" and ">" are &-encoded:</div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 13px;"> (xml (p "The <br/> tag is a line break.")) </span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 13px;"> ==> <p>The &lt;br/&gt; tag is a line break.</p></span></font></div><div><br></div><div>whereas at-expression "<" and ">" are not:</div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 13px;"> @xml{<p>The <br/> tag is a line break.</p>}</span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div><font class="Apple-style-span" face="Monaco" size="3"><span class="Apple-style-span" style="font-size: 13px;"> ==> <p>The <br/> tag is a line break.</p></span></font></div><div><br></div><div><br></div><div>Any advice would be much appreciated.</div><div><br></div><div>Many thanks,</div><div><br></div><div>-- Dave</div><div><br></div></div></div></body></html>