<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>hi<BR> <BR>I have a function parseInt... which needs an error guard for when the input is not an Int.<BR> <BR>parseInt :: Parser<BR>parseInt [] = []<BR>parseInt xs = let (digits, rest) = span isDigit (removeSpace xs)<BR> in [(EInt (read digits), removeSpace rest)]<BR> <BR>Also... I have a function that does this... parseBinaryOp "+" "(5 + 2) if" gives...[(Int 5, Int 2, "if")]<BR>so, op is '+' or "&&". I am unsure of how to begin... <BR> <BR>parseBinaryOp :: String -> String -> [(Expr, Expr, String)]<BR>parseBinaryOp op str<BR> <BR>Thankyou<BR> <BR>Ryan<br /><hr />Are you the Quizmaster? <a href='http://specials.uk.msn.com/brainbattle' target='_new'>Play BrainBattle with a friend now!</a></body>
</html>