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&#39;s a backslash-newline combination anywhere in the token stream, I&#39;d like to remove it so it&#39;s not read by the rest of the parser, even if its in the middle of a keyword.
<br><br>Currently I&#39;m doing this with a separate &quot;preprocess&quot; function that weeds out all the &#39;\\\n&#39; strings from the input before passing it to the parser.&nbsp; The problem with this is it messes up the line position when there&#39;s an error below the &#39;\\\n&#39; point, since the newline is never seen by the parser.
<br><br>So I&#39;ve been trying to figure out how to handle this better with Parsec.&nbsp; 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&quot;) covers this, but I&#39;m not having much luck turning it into
working code. <br><br>Could someone who&#39;s written their own scanner spell out how it&#39;s done in a little more detail ?<br>&nbsp;  <br>Thanks !<br><br>- jude<br>