Question: NOTE: Code should be written in Haskell This question asks you to define a parser for strings. You may use the standard parsing functions (e.g.,

NOTE: Code should be written in Haskell
This question asks you to define a parser for strings. You may use the standard parsing functions (e.g., those in Hutton, Ch. 8, or those in Parsing.hs). You can also assume that all the character processing operations (as provided in Hutton, A. 3) are available to you, as if you had import Data. Char at the beginning of your program. Write a parser that recognizes strings s_1 s_2 s_3, ... where s_1 is the uppercase character of s_2. That is to say, strings starting with a capital letter, followed by that same letter in lowercase form. Here are some examples of how your parser, myParser, should behave on various inputs: Main> parse myParser "aA" [] Main> parse myParser "Bbbc" [("Bb", "bc")] Main> parse myParser "Abbc" []
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
