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

Is it possible to get a report on which production was being handled when an error arose? #419

Open
filmil opened this issue Oct 25, 2024 · 1 comment

Comments

@filmil
Copy link

filmil commented Oct 25, 2024

Here's an error message I encountered while using participle to parse a value change dump (VCD) file. See: filmil/go-vcd-parser#2.

unexpected token "V" (expected <kwend>)

Now participle is of course correct. But it is not exactly helpful. It does not tell me which production was parsed when the error occurred. I have multiple productions that may end with keyword $end. And one of the issues may be that my grammar has started parsing a wrong production somehow.

Perhaps this is already supported?

@alecthomas
Copy link
Owner

No, this is not possible. Errors don't currently track the production that triggered them.

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

4 participants
@alecthomas @filmil and others