Newsgroups: comp.lang.scheme
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!howland.reston.ans.net!ix.netcom.com!netcom.com!thinman
From: thinman@netcom.com (Technically Sweet)
Subject: Re: an implementation of READ that preserves line numbers
Message-ID: <thinmanD4Iw3t.IB6@netcom.com>
Organization: International Foundation for Internal Freedom
References: <QOBI.95Feb21174013@qobi.ai>
Date: Fri, 24 Feb 1995 21:09:28 GMT
Lines: 17
Sender: thinman@netcom4.netcom.com

qobi@qobi.ai (Jeffrey Mark Siskind) writes:

>Does anybody have an implementation of a full-fledged Scheme READ that
>preserves line numbers? Something that returned an object where every nested
>list, pair, or vector was wrapped with a pair that gave the line number where
>that object started (or the range of line numbers for that object).

Another way to implement this is dual returns: the actual input structure
and a separate list of cons cells and vectors in the structure.
These allow you to efficiently find a target entry in the structure
without mucking up the structure itself.

-- 

Lance Norskog
thinman@netcom.com
Artisputtingtogether. Art  s th ow n  aw y.
