This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Read-state
- To: guile at sourceware dot cygnus dot com
- Subject: Read-state
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: Tue, 21 Mar 2000 15:29:31 +0100
- Reply-to: Mikael Djurfeldt <djurfeldt at nada dot kth dot se>
One of our "semi-global" scopes for state information is "per
print-call-chain". We need this scope for circular reference
detection and fancy printing state information.
We actually need the symmetric per read-call-chain as well:
Currently, there are reading options such as whether to care about
case or not, and whether to record positions or not, and state
information such as filename and row and column number, and these have
global scope!
This of course breaks when used together with virtual ports and
read-hash-extend, particularly if the virtual port or syntax extension
uses `read' internally.
Global scope is also unacceptable when moving to multi-language
support.
Read states could be implemented in a similar way as the current
print-states. Reading procedures could take a
scm_tc16_port_with_read_state as well as a port as second argument.