2 messages in com.perforce.jammingstring too big
FromSent OnAttachments
Pete...@harlequin.co.uk08 Feb 1999 12:06 
Pete...@harlequin.co.uk09 Feb 1999 02:55 
Subject:string too big
From:Pete...@harlequin.co.uk (Pete@harlequin.co.uk)
Date:02/09/1999 02:55:22 AM
List:com.perforce.jamming

However, the size of these dependency files is quite large, and Jam croaks whilst "include"ing them with the cryptic error message "string too big at argument message". This appears to be due to the way that the scan routines work by reading in the whole file before tokenising when included between braces.

Ooops. Ignore this. I didn't read it closely enough. It appears that a mystical " got into my dependency files. The actual reason for the failure was a bug in the example Jambase header scanning regexp. May I suggest that we replace

HDRPATTERN = "^[ \t]*#[ \t]*include[ \t]*[<\"](.*)[\">].*$" ;

with something like

HDRPATTERN = "^[ \t]*#[ \t]*include[ \t]*[<\"]([^\">]*)[\">].*$" ;

The problem arises when someone comments the #include with a string containing either a " or a >. Regexps are greedy, and so the (.*) will match as much as it can, including parts of comments on #include statements.

Cheers

Pete