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 support internally for choosing the value of enum cases #507

Merged
merged 5 commits into from
Dec 20, 2024

Conversation

msprotz
Copy link
Contributor

@msprotz msprotz commented Dec 20, 2024

Essentially, adds support for typedef enum t = { Foo = 42, ... } in the internal AST, with the understanding that this can come out as a C11 enum (via a command-line flag) or the usual series of #defines, and each will assign correct numerical values to each enum case.

For now, this assumes that either all enum cases have an assigned value, or that none have an assigned value. (This could be easily fixed).

CC @tahina-pro who might find this useful for everparse: hit me up if you want more details!

@msprotz msprotz enabled auto-merge December 20, 2024 18:23
@msprotz
Copy link
Contributor Author

msprotz commented Dec 20, 2024

#23 5.498 [2024-12-20 18:33:41] [STDERR]  - Z3 solver not found.
#23 5.498 [2024-12-20 18:33:41] [STDERR]  - Required version: 4.8.5
#23 5.879 [2024-12-20 18:33:41] [STDERR]  - Please download version 4.8.5 of Z3 from
#23 5.879 [2024-12-20 18:33:41] [STDERR]        https://github.com/Z3Prover/z3/releases
#23 5.879 [2024-12-20 18:33:41] [STDERR]    and install it into your $PATH as 'z3-4.8.5'.

@msprotz
Copy link
Contributor Author

msprotz commented Dec 20, 2024

@mtzguido FYI

@msprotz msprotz merged commit 4c619aa into master Dec 20, 2024
2 checks passed
@msprotz msprotz deleted the protz_numbered_enums branch December 20, 2024 19:33
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