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

How to do error recovery #21

Open
artempyanykh opened this issue Feb 14, 2022 · 2 comments
Open

How to do error recovery #21

artempyanykh opened this issue Feb 14, 2022 · 2 comments

Comments

@artempyanykh
Copy link

artempyanykh commented Feb 14, 2022

I've started using Farkle to build a parser for a programming language. I'm happy with the library and the results I'm getting, so thanks for working on it!

One thing that's not very clear to me is how to do error recovery with Farkle – with parser generators a-la yacc/bison/menhir I have access to 'error' productions; by inserting it in strategic places I can make the parser parse as much as possible while accumulating parse errors. Is there a similar mechanism in Farkle?

@teo-tsirpanis
Copy link
Owner

Hello @artempyanykh and thanks for using Farkle! I am very glad it serves you well.

Error recovery is indeed a gap in Farkle's feature set and unfortunately something I will not work at any time soon. My time is pretty limited these days and I have lots of other things in mind for Farkle. But I acknowledge that this is an important feature to have.

If you have any ideas on the user-facing APIs to implement error handling, I will be glad to hear them.

@teo-tsirpanis teo-tsirpanis added this to the Future milestone Feb 14, 2022
@artempyanykh
Copy link
Author

Hey @teo-tsirpanis, that's all right! Farkle as-is is already very-very helpful, much more so than fslexyacc was for me. Thanks for putting in the hard work.

For now, I can probably go by without finer error recovery, but if things change I'll make sure to follow up here.

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

No branches or pull requests

2 participants