Alex Shinn <xxxxxx@gmail.com> schrieb am Sa., 22. Aug. 2020, 17:37:
On Sat, Aug 22, 2020 at 11:55 PM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:

Many systems just copy your implementation. Furthermore, there are three pure R7RS constructs that are problematic when identifiers are textually replaced:

(1) Quotation of identifiers. This can actually be solved by making sure that the replacing identifier has the same symbolic name, which can be achieved by some more syntax-rules magic.

Good point, I might do this.
 
(2) include and include-ci are standard R7RS forms that will break the technique.

True, though again stretching the imagination to suggest that someone might want to include a file with expressions referring to a locally bound match variable.

(3) Literals with cycles, which are allowed by R7RS will break any textual scanner.

These are only allowed directly in quote and can therefore be avoided when walking.

You cannot detect the use of quote. It could be hidden in some macro expansion.


--
Alex