Haskell Folks,<br><br>I have an existing Parsec CharParser parser that I would like to extend to include line continuation support.<br>When there's a backslash-newline combination anywhere in the token stream, I'd like to remove it so it's not read by the rest of the parser, even if its in the middle of a keyword.
<br><br>Currently I'm doing this with a separate "preprocess" function that weeds out all the '\\\n' strings from the input before passing it to the parser. The problem with this is it messes up the line position when there's an error below the '\\\n' point, since the newline is never seen by the parser.
<br><br>So I've been trying to figure out how to handle this better with Parsec. I think I need something that acts just like CharParser, except it skips over the backslash-newline tokens, It looks like section 2.11 in the Parsec manual (Advanced: separate
scanners") covers this, but I'm not having much luck turning it into
working code. <br><br>Could someone who's written their own scanner spell out how it's done in a little more detail ?<br> <br>Thanks !<br><br>- jude<br>