The parser recognizes exactly one leading operator character:An empty input fails, and any later characters remain for the next parser. The last example printed in this part uses the name
parseOp :: Parse Char
parseOp (c:cs)
| c `elem` "+-*/" = Just (c,cs)
parseOp _ = NothingparseInt; its failure result does not change the requested operator parser. Articles by others on the same topic
There are currently no matching articles.