Hi,<br><br>Since it's not the first time I'm having a hard time with this issue (and I know others have too), I'm going to ask for advice or for a feature request:<br><br>Reading arbitrary Racket-related files with `read' and `read-syntax' becomes complicated when there are #lang and especially #reader lines. As of today, I couldn't find a simple and general way to deal with that.<br>
<br>The #lang line can be handled properly with `read-language', but it still eats the first non-whitespace character, thus continuing with `read' will fail, so reading must be restarted from the beginning of the file.<br>
<br>The #reader "directive" is more problematic since what follows it can be anything.<br><br>Does anyone know a way to deal with all that correctly?<br><br>If not, my feature request would be a more general `read' and `read-syntax' that can read any Racket-based language file and turn it into a s-expr.<br>
(It would be even better if comments could be read in something like (struct comment ....) if an optional argument to `read' is provided!)<br><br>Thank you very much!<br>Laurent<br>