For example this parser doesn't parse "abc"
test :: Parser String
test = ((try $ string "a") <|> (string "ab")) *> (string "c")
I can rewrite it so it would parse "abc", but is there any general approach to force parser to return and try other branches?
(try a <|> b) *> c
Something like
(tryOtherBranchesIfFail (try a <|> b)) *> c
So if it cannot parse "abc" with (try a *> c) it could return and try (b *> c)
Or it isn't possible?