Hi all,<br><br>I&#39;d like to use parsec to parse IP addresses. So far I&#39;ve written a (tiny) parser for bytes:<br><br>byte :: GenParser Char st Word8<br>byte = do<br>         n &lt;- many1 digit<br>         return (read n)<br>
<br>The function works fine, but it accepts numbers greater than 255. <br>How do I encapsulate this condition in the parser so that it fails (with en appropriate error message) in this case?<br><br><br>Thanks a lot,<br><br>
Patrick<br clear="all"><br>-- <br>=====================<br>Patrick LeBoutillier<br>Rosemère, Québec, Canada<br>