Skip to content

Instantly share code, notes, and snippets.

@shangaslammi
Created March 3, 2012 20:56
Show Gist options
  • Save shangaslammi/1968185 to your computer and use it in GitHub Desktop.
Save shangaslammi/1968185 to your computer and use it in GitHub Desktop.
Example: parsing quoted strings with an applicative parser
quotedString :: Parser String
quotedString = char '"' *> many (escaped <|> nonQuote) <* char '"' where
escaped = char '\\' *> anyChar
nonQuote = charIf (/= '"')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment