[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-janitors] #505: permit user-defined read-syntax to restart the
From: |
Chicken Trac |
Subject: |
[Chicken-janitors] #505: permit user-defined read-syntax to restart the reader |
Date: |
Thu, 17 Feb 2011 21:23:26 -0000 |
#505: permit user-defined read-syntax to restart the reader
-----------------------------------+----------------------------------------
Reporter: zbigniew | Owner: zbigniew
Type: enhancement | Status: new
Priority: minor | Milestone: 4.7.0
Component: core libraries | Version: 4.6.x
Keywords: don't fear the reader |
-----------------------------------+----------------------------------------
Currently, user-defined read-syntax must return a value to the reader; it
cannot simply discard input completely. A proposed solution, derived from
CL reader macros (see CLHS 2.2 no.4) allows a zero-value {{{(values)}}}
return to reinvoke the reader in tail position, discarding any consumed
input forever.
This change permits user implementation of line comments, block comments,
s-expr comments, read-time feature testing, read-time evaluation, and
more; all with the existing user API.
Though a zero-value return is admittedly ugly and inefficient -- one noted
luminary has rightfully referred to it as a "festering CL pustule on the
buttocks of Scheme" -- it has the advantages of being compatible with the
current API and being virtually impossible to trigger accidentally.
--
Ticket URL: <http://bugs.call-cc.org/ticket/505>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.
- [Chicken-janitors] #505: permit user-defined read-syntax to restart the reader,
Chicken Trac <=
- [Chicken-janitors] Re: #505: permit user-defined read-syntax to restart the reader, Chicken Trac, 2011/02/17
- [Chicken-janitors] Re: #505: permit user-defined read-syntax to restart the reader, Chicken Trac, 2011/02/17
- [Chicken-janitors] Re: #505: permit user-defined read-syntax to restart the reader, Chicken Trac, 2011/02/19
- [Chicken-janitors] Re: #505: permit user-defined read-syntax to restart the reader, Chicken Trac, 2011/02/22
- [Chicken-janitors] Re: #505: permit user-defined read-syntax to restart the reader, Chicken Trac, 2011/02/22