Dear cafe,

Given

data Expression = ExpToken String | ExpAnd Expression Expression

How to write an attoparsec parser that parses this example:

"a" and "b" and "c"

into

ExpAnd (ExpToken "a") (ExpAnd (ExpToken "b") (ExpToken "c"))?


Regards,
Hon