Re: Bigloo Regexp: m/ /ms (now: Regular Parsing)

[email protected]
Newsgroups gmane.lisp.scheme.bigloo
Organization Inria
Message-ID <[email protected]>
Hi Laurent,

> Here is my try on it. Besides the ugly copying operations, it seems to 
> me that the multiline option doesn't make what I was waiting for: 
> finding a pattern across a newline.
I'm afraid this is not a solution as mmap-substring (as well as mmap->string)
creates a copy of the mmap-ed area. Your solution is then equivalent
to:
  (call-with-input-file MY-FILE (lambda (in) (pregexp-match (read-string in))))

The copy is a consequence of the memory representation of strings. It cannot
be avoided.

The only solution would be to change pregexp to accommodate mmap, which should
be a good idea and not that difficult to implement but which is not already
here yet.

Cheers,

-- 
Manuel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.