<br>Is there a way to turn a string into a syntax object without calling read? Something feels wrong with what i'm doing. {I mean someting feels wrong beond the fact that i'm dealing with infix notation ;)}<br><br><br>The setup:
<br><br>i've written a re-infixer that does the reverse of Dannys "infix" package. It works as follows:<br><br>> (refix `(+ 2 4))<br>"(2 + 4)"<br><br>{note that it returned a string}<br><br>I then do a "full circle" test by doing:
<br><br>> (refix `(define x 7))<br>"define(x, 7)"<br>> x<br>. reference to undefined identifier: x<br>> (read (open-input-string (string-append "(infix " (refix `(define x 7)) ")")))
<br>(infix define (x ,7))<br>> x<br>. reference to undefined identifier: x<br>> (eval (read (open-input-string (string-append "(infix " (refix `(define x 7)) ")"))))<br>#<primitive:>><br>
> x<br>7<br><br>However doing '(string-append "(infix " {blah} ")")' feels wrong. It feels more like i should be doing:<br>(eval `(infix ,(some-command-to-turn-a-string-into-a-syntax-object "define(x, 7)")))
<br><br><br>Anyone have comments, or ideas for better ways to do this?<br><br>Corey<br><br>-- <br>((lambda (y) (y y)) (lambda (y) (y y)))