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

ACSL parser and translator improvements #7

Merged
merged 9 commits into from
Oct 26, 2023
Merged

Conversation

zafer-esen
Copy link
Collaborator

@zafer-esen zafer-esen commented Oct 26, 2023

This PR updates the ACSL grammar and translator with several fixes and improvements.

  • Terms and predicates are merged into a single Expr. The parser now can handle operator precedences - before, parentheses were required almost in all expressions.
  • Better parsing of C types - most C types should now be supported (largely untested).
  • Foundation for better error messages - source code locations are added to the translator.
  • Fixed possibly other issues in the grammar, there were ~400 shift/reduce and reduce/reduce conflicts, now there are only 7 shift/reduce conflicts which are expected.

The translator still leaves large parts of ACSL unimplemented, but extensions should now be more straightforward to implement.

@zafer-esen zafer-esen self-assigned this Oct 26, 2023
@@ -1,7 +1,5 @@
#!/bin/sh

set -e
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A hidden change in this PR, regression tests will now continue until all tests are completed. This is better for getting feedback on exactly which tests failed.

@zafer-esen zafer-esen merged commit d2c36a1 into master Oct 26, 2023
1 check passed
@zafer-esen zafer-esen deleted the acsl-precedence-fix branch October 26, 2023 22:08
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

Successfully merging this pull request may close these issues.

1 participant