"Anton van Straaten" <email@example.com> writes:
> Chunks don't work well unless the file can be chunked in such a way
> as to avoid breaking up a possible match. Line-oriented reading of
> the file is one way around this in many cases, but what's really
> needed here is stream functionality, for example as provided by
> Scheme's ports. But SCSH doesn't seem to have a way to perform
> regexp matching on ports. Have I missed something?
No, you haven't. You cannot perform regular expression matches
directly on a stream in scsh, and that's a pain in my opinion. It
basically makes it very hard to use scsh to analyse files whose format
cannot easily be split into chunks, and that's unfortunately the case
of many real-world files (e.g. any file containing code written in a
language which tolerates multi-line comments).
This issue was raised here some time ago, so you might be interested
in reading the thread. It starts with the following article:
(There seems to be a problem with Google, which insists on putting
some very old articles in the same thread, just before the one I
mention above. You don't need to read them, they do not really belong
to the thread).