Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backtracking with try #50

Closed
deflexor opened this issue Nov 14, 2015 · 3 comments
Closed

backtracking with try #50

deflexor opened this issue Nov 14, 2015 · 3 comments

Comments

@deflexor
Copy link

https://gist.github.com/deflexor/247f97f4a59de0de5109

Here is example of strange behaviour. Parser starts parsing '<html...' with try, but when it fails it backtracks to 'h', but not to '<' as expected

@mrkkrp
Copy link
Contributor

mrkkrp commented Nov 14, 2015

Any reason you prefer to do it with Parsec (manually) instead of using something like tagsoup? You could track this problem further and create really minimal example, i.e. 5-10 lines that clearly demonstrate the bug (if it's a bug).

Parsec is currently in somewhat “suspended” state of development for some reason, you can take a look around to check how many issues and PR are ignored, so probably you won't get any feedback here.

I maintain a modern fork of Parsec — Megaparsec, you could give it a try, though.

@aslatter
Copy link
Collaborator

Hi @deflexor - it looks like your parser is failing inside the head element while parsing nested data. We can backtrack, but after backtracking the other alternative (a comment) doesn't work either so there isn't much we can do.

I think in markupParser you're not handling whitespace in between elements here: P.many1 tagorcomment.

Hey @mrkkrp - feel free to email me with any complaints about Parsec maintenance.

@mrkkrp
Copy link
Contributor

mrkkrp commented Nov 16, 2015

@aslatter, It's definitely good that you're back, I hope there won't be such “gaps” (half a year?) in future!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants