Closed faucct closed 4 years ago
Okay, I guess I was not understanding the try
semantics: try parser1 *> try parser2 /= try (parser1 *> parser2)
.
You might want to take time to go through the tutorial: https://markkarpov.com/tutorial/megaparsec.html. It explains everything you need to know, including backtracking.
Hello. I am trying to describe a parser which would be able to return
1
in this case, so I could run it on remaining string, getting a sequence of tokens:1
and+
.