[Openmcl-devel] *readtable* and break loop

Gary Byers gb at clozure.com
Thu Sep 19 10:37:47 PDT 2002



On Thu, 19 Sep 2002, Ben Hyde wrote:

> Gary Byers wrote:
>  > > While it's amusing for a moment or two to discover that #\: has
>  > > been given a unique semantics in the break loop you've just
>  > > fallen into the joke get's old quickly.
>  >
>  > ...  Could you please explain ...
>
> ?
> ? (function-that-does-many-neat-things-including-parsing-xml)
> > Error: BAD-THING
> >        Yo your XML is bizzare!
> > While executing: DEEP-THOUGHT::SERIOUS-INTERNAL-FUNCTION
> > Type :POP to abort.
> Type :? for other options.
> 1 > :pop
> ":pop"
> 1 > :b
> ":b"
> 1 >
>
> In this situation the xml parser bound *readtable* to something
> that treats #\: in that delightful way.  Clever parser.

Sorry; I hadn't understood the reference to #\:.  Now I get it ...

A long time ago, someone writing a C parser in MCL added a
"Restore Readtable" menu command to help them recover in situations
like this.  That's not really an option for OpenMCL.

I think that the two-stage approach is probably right: (a) check to
make sure that a critical global variable has a sane value before
entering the break loop and set it to something sane if it isn't;
(b) bind "critical global variables" to useful values around the break
loop.  (An XML readtable is a "sane" value for *READTABLE*, but not
a "useful" value for interacting with the break loop.)

The mechanism for (a) is already there (CCL::CHECK-ERROR-GLOBAL);
(b) almost sounds like a job for PROGV.  Before anyone slaps me on
the shoulder and comments on my dry sense of humor: using PROGV
would let one extend the set of "critical global variables", and
that might occasionally be useful.



_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel




More information about the Openmcl-devel mailing list