[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pattern matching and read tables question
I have a pattern matcher (written in Scheme) that I would like to give the
capability of stripping prefix characters from words. For example, I
would like to pass the pattern matcher something like:
and change it to be:
The "+", of course, will not be present on all words in the pattern.
The most obvious solution is to use explode and implode, but I'm looking
for something much more efficient. I would guess that altering the read
table would be the way to go. Then I wouldn't have to do the "explosion"
inside the pattern matcher at all. At least, I think that's possible; I
really don't know much about read tables.
Any advice on how to solve this problem (with read tables or otherwise)
would be most appreciated. You may reply directly to me.
Thanks in advance,