[racket] Retrofitting call/cc onto an interpreter not written in CPS

From: Patrick Li (patrickli.2001 at gmail.com)
Date: Tue Mar 8 22:58:43 EST 2011


I'm programming a toy interpreter for Scheme for educational purposes. It's
programmed in C, and I've got a basic interpreter with the basic forms
working as well as tail call elimination.

I'm wondering, at this point, what's the easiest way to get call/cc working?
The interpreter is not programmed in CPS.

And can someone verify whether I'm understanding continuations properly? Are
they just essentially a "label"? That is, it's just some structure that
contains the next code to execute, and the environment in which to execute
that code in?

Thanks for your help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20110308/cd28ecb7/attachment.html>

Posted on the users mailing list.