<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16788" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Courier New" size=2>Please help me with the following problem
extracted from a larger piece of code.</FONT></DIV>
<DIV><FONT face="Courier New" size=2>I have in .../collects/problem/lang
the following two files:</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>;file reader.ss</FONT></DIV>
<DIV><FONT face="Courier New" size=2>(module reader syntax/module-reader
scheme<BR> #:wrapper1<BR> (lambda (t)<BR> (parameterize
((current-readtable readtable))</FONT></DIV>
<DIV><FONT face="Courier New" size=2> (t)))</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New" size=2> (define read-braces<BR>
(case-lambda<BR> ((ch port src line col pos)<BR> #`(lambda
#,@(read-syntax/recursive 'problem port #\{)))<BR> ((ch
port)<BR> (cons 'lambda (read/recursive port
#\{)))))</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New" size=2> (define readtable<BR>
(make-readtable #f #\{</FONT></DIV>
<DIV><FONT face="Courier New" size=2> 'terminating-macro
read-braces)))</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Courier New" size=2>and</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>;file test.ss</FONT></DIV>
<DIV><FONT face="Courier New" size=2>#lang problem<BR>({x x} 1 2 3) ; to be read
as ((lambda x x) 1 2 3)</FONT></DIV>
<DIV><FONT face="Courier New" size=2>; mark the two braces.</FONT></DIV>
<DIV><FONT face="Courier New" size=2></FONT> </DIV>
<DIV><FONT face="Courier New" size=2>When I try to run test.ss it keeps eating
memory in the compilation phase until memory limits are exceeded
(700Mb) DrScheme's run icon remains standing still. </FONT><FONT
face="Courier New" size=2>I guess the reader is getting into an infinite
regression, but I fail to see how to avoid that problem. I use:</FONT></DIV>
<DIV><FONT face="Courier New" size=2>Welcome to DrScheme, version
4.1.3.6-svn20dec2008 [3m].<BR>Language: Module; memory limit: 700
megabytes.</FONT></DIV>
<DIV><FONT face="Courier New" size=2>The readtable works correctly when used
at top level.</FONT></DIV>
<DIV><FONT face="Courier New" size=2>Help please,</FONT></DIV>
<DIV><FONT face="Courier New" size=2>Jos</FONT></DIV></BODY></HTML>