hi
The code below does almost what I want but not quite! It outputs...parseInt "12444a" gives...
[(EInt 1,"2444a"),(EInt 2,"444a"),(EInt 4,"44a"),(EInt 4,"4a"),(EInt 4,"a")]
What I want is: [(EInt 12444, "a")]
data Expr = EInt {vInt :: Int} -- integer values
| EBool {vBool :: Bool} -- boolean values
parseInt :: Parser
parseInt (x:xs)
| (isDigit x && xs /= []) = [(EInt (read [x]),xs)] ++ parseInt xs
| isDigit x && xs == [] = [(EInt (read [x]),[])]
| otherwise = []
Thanks
Ryan
Get closer to the jungle. I'm a Celebrity Get Me Out Of Here!