From: Joseph McDonald
Subject: shrinking text into a list
Date:
Message-ID: <1253@netcom.UUCP>
ddfa
Hello all,
I am relatively new to LISP and would like to know if there is an easy
solution to the following problem: (I am using XLISP 2.0)
(setq l '( START MARKER jibber jabber jibber jabber MARKER jibb:er jabber
jib:ber jabber MARKER jibber MARKER EN:D START jibber MARKER
jabber jibber MARKER jib:ber END START jibber jabber M:ARKER
jabber MARKER END))
now what I want to do is go through the list and make a smaller list like:
(start marker1 marker2 end start marker3 end start marker4 end)
where marker(?) is bound to all the jibber jabber between the markers
and then make a list like
(start1 start2 start3)
where start(?) is bound to all the markers.
In other words I want to shrink the data down and then be able to blow
it back up again later. One of my main problems is that if i try to:
(setq (gensym marker) <all the jibber jabber>)
It won't let me because setq will not take genysm as an argument. How do
you setq variables on the fly?
Thank you very much.
BTW the end result of this program is supposed to be a language translator.
jcm
ZZ