Pascal Bourguignon <email@example.com> wrote:
| "Stefan Kamphausen" <firstname.lastname@example.org> writes:
| > Is there any idiomatic way to acces -say- ALLIANCE/STARTDATE/MONTH
| > easily?
| It's rather trivial to walk a tree given a path.
| (defun walk (tree path) ... )
Quite coincidentally, today I needed to do a bit of data extraction
from some hardware-design EDIF format files -- which are just single
huge s-exprs of the form (ELEMENT-NAME [OPTIONAL-LABEL] ELEMENTS...) --
and the notion of a PATH argument was just the hint I needed!
p.s. I extended my PATHs to allow both element-names and
lists of (ELEMENT-NAME LABEL), but it was equally trivial to
walk, once the notion of a "path" in the API was suggested.]
p.p.s. Hint: For best results working with EDIFs, do
a (setf (readtable-case *readtable*) :invert) first. ;-}
Rob Warnock <email@example.com>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607