I am using the MatchPS module for loads of tool integration tasks (peeking
into the output from those tools looking for important signs and relevant 
messages). 

Unfortunately, MatchPS.matchPS seems to be quite restrictive wrt. the 
size of the string that can be matched against a pattern: it fails if the 
length of the (matched?) string is greater than 2560 (Hm).

Here's a simple test driver allowing the user to input the length of the
list (minus 1 needed for the end of line character):

module Main (main) where

import PackedString
import MatchPS 


main = do {
        maxl <- readLn;
        msg <- return (packString (take maxl (repeat 'a') ++ "\n"));
        case matchPS (packString "^.*$\n") msg [] of 
                Nothing -> putStr "noMatch"
                (Just rem) -> putStr (unpackPS(getLastMatch rem msg))
} 


And here's the test run (giving the message the length 2561)


        ewk@hydra% pgm
        2560

        Fail: re_match: Internal errorewk@hydra% 


Are there any work arounds to the problem that would allow me to go on
using my tools for some real-world-sized strings - say, somewhere
between 10 and 100KB (or even better, on the long run, no limits expect
those imposed by the size of the heap).

Regards,
Einar


BTW: I am running 2.04 on a Sparc-Ultra/Solaris ... in case its relevant.

Reply via email to