<p dir="ltr">Comparing lexical context is a very involved process.  Remember that every syntax object potentially carries context for an unbounded number of symbol names at an unbounded number of phases, since context information can be transferred freely.  Comparing all of them for equivalence would be quite expensive.  You probably want to either decide what subset of that context is relevant to you, or reformulate your solution in a way that does not involve comparing syntax at all.  It's a problematic technique to employ, to say the very least.</p>

<div class="gmail_quote">On Aug 17, 2014 12:02 PM, "Alexander D. Knauth" <<a href="mailto:alexander@knauth.org">alexander@knauth.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>But those only work on identifiers, right?</div><div><br></div><div>But would something like this work?</div><div><br></div><div>(define (lexical-context=? s1 s2)</div><div>  (bound-identifier=? (datum->syntax s1 ‘x) (datum->syntax s2 ‘x)))</div>
<div><br></div><div>Or would that miss something?  </div><div><br></div><div><br></div><br><div><div>On Aug 17, 2014, at 1:31 PM, Roman Klochkov <<a href="mailto:kalimehtar@mail.ru" target="_blank">kalimehtar@mail.ru</a>> wrote:</div>
<br><blockquote type="cite"><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
Maybe something of<br><br><a href="http://docs.racket-lang.org/reference/stxcmp.html?q=free-identifier" target="_blank">http://docs.racket-lang.org/reference/stxcmp.html</a><br><br>?<br><br><br>Sat, 16 Aug 2014 23:32:10 -0400 от "Alexander D. Knauth" <<a href="mailto:alexander@knauth.org" target="_blank">alexander@knauth.org</a>>:<br>
<blockquote style="border-left-width:1px;border-left-style:solid;border-left-color:rgb(8,87,166);margin:10px;padding:0px 0px 0px 10px"><div><div><div>Is there any way to check whether two syntax objects have the same lexical information, syntax-e (recursively), source location, properties, and whatever else they have, even if they aren’t eq?<br>
<br>For the syntax-e and source-location this is straightforward, but if there’s no accessor for the lexical information then how do I check if the lexical information is the same if the syntax objects aren’t eq?<br><br>And for the properties, can you only check the properties with keys that are interned symbols?<span> </span><br>
<br><br><br>____________________<br>  Racket Users list:<br>  <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br></div></div></div></blockquote><br><br>--<span> </span><br>
Roman Klochkov</div></blockquote></div><br></div><br>____________________<br>
  Racket Users list:<br>
  <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div>