Re: parsing strings

Ross Paterson <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs
Message-ID <[email protected]>
[trawling through old bug reports]

On Wed, Jul 30, 2003 at 06:44:52PM +0000, Iavor Diatchki wrote:
> there seems to be a problem when parsing multi-line strings:
> in the first string there is no space after the \,
> while in the second there is.  i tried this on linux,
> with the july version of hugs.
> 
> > probelm = "hello \
> >           \world"
> 
> > noproblem = "hello \
> >             \world"
> 
> 
> the error i get is:
> "Illegal character escape sequence "\w"

I think this one is also due to your use of the C preprocessor.
The treatment of backslashes by cpp changed in recent versions of gcc.
Adding the space is now a necessary workaround.

People who don't use -F to run each source file through cpp are
unaffected, of course.
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.