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

Allow comma before brace for named enum #57

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

wutka-vandy
Copy link
Contributor

In cparser.mly, an enum is only allowed to have a comma directly before a } if the enum doesn't specify a type name, but if the enum does specify a type name, it throws a Cparser.MenhirBasics.Error. For example, in this file, the first enum declaration succeeds but the second causes an error (comment out the second one and see that the error disappears):

enum {
  FOO,
  BAR,
  BAZ,
};

enum Fooble {
  QUUX,
  FRED,
};

This change allows the second one to parse successfully.

@ivg ivg merged commit 0efac29 into BinaryAnalysisPlatform:master Nov 8, 2024
8 of 12 checks passed
@ivg
Copy link
Member

ivg commented Nov 8, 2024

Thank you!

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.

3 participants