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

Add test program to verify compile-time error if no type in for-in loop #4812

Merged

Conversation

jafingerhut
Copy link
Contributor

No description provided.

Signed-off-by: Andy Fingerhut <andy_fingerhut@alum.wustl.edu>
@fruffy fruffy added the infrastructure Topics related to code style and build and test infrastructure. label Jul 16, 2024
@kfcripps
Copy link
Contributor

I think it would make sense to improve the parser errors in general. This is not just a matter of missing type if loops, the parser errors are quite confusing and hard to read in general. I'm not sure how much does the parser generator allow for customization of them though...

We also have #2478 that is related to this :)

@ChrisDodd
Copy link
Contributor

I think it would make sense to improve the parser errors in general. This is not just a matter of missing type if loops, the parser errors are quite confusing and hard to read in general. I'm not sure how much does the parser generator allow for customization of them though...

We also have #2478 that is related to this :)

In general, to improve these parse errors, you need to add code (rules) to the bison parser that matches in the problematic cases and then emits a more specific/better error. Doing this without introducing conflicts and breaking things that should work is sometimes tricky.

@fruffy fruffy added this pull request to the merge queue Jul 18, 2024
Merged via the queue into p4lang:main with commit 0dc923d Jul 18, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Topics related to code style and build and test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants