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

Fix #479: C backend: preserve case in union member names #480

Merged
merged 3 commits into from
Apr 28, 2024

Conversation

andreasabel
Copy link
Member

@andreasabel andreasabel commented Apr 23, 2024

Fix #479: C: case-sensitive labels: preserve case in union member names.

Java does not suffer case-sensitive labels as each label becomes a class in its own file.
Thus, we check this and throw an error.
Consequently, test 479_LabelsCaseSensitive is broken for the java backends.

Breaking change: this might break C client code.

Fixes #479

@andreasabel andreasabel force-pushed the issue-479 branch 2 times, most recently from a4b6e0a to 9ee3aec Compare April 23, 2024 13:05
@andreasabel andreasabel changed the title Bump CI to GHC 9.10.0 and latest minor versions Fix #479: C backend: preserve case in union member names Apr 23, 2024
@andreasabel andreasabel added this to the 2.9.6 milestone Apr 23, 2024
@andreasabel andreasabel added C AST Concerning the generated abstract syntax labels Apr 23, 2024
@andreasabel andreasabel self-assigned this Apr 23, 2024
@andreasabel
Copy link
Member Author

@ivanperez-keera : Would this change in the C backend affect you? What is your opinion?
In short, union member for EInt used to be eint_, now it is eInt_. So the first letter is made lowercase, but the rest no longer, instead its case is preserved.

@andreasabel
Copy link
Member Author

This adds java/479_LabelsCaseSensitive to the broken tests:

  • Pygments backend:Pygments Backend
  • Parameterized tests:Java (with jflex and line numbers):Java (with jflex and line numbers):479_LabelsCaseSensitive
  • Parameterized tests:Java (with jflex):Java (with jflex):479_LabelsCaseSensitive
  • Parameterized tests:Java (with namespace):Java (with namespace):479_LabelsCaseSensitive
  • Parameterized tests:Java (with line numbers):Java (with line numbers):479_LabelsCaseSensitive
  • Parameterized tests:Haskell/GADT:Haskell/GADT:289_LexerKeywords
  • Parameterized tests:Java (with antlr):Java (with antlr):479_LabelsCaseSensitive
  • Parameterized tests:OCaml:OCaml:289_LexerKeywords
  • Parameterized tests:OCaml:OCaml:202_comments
  • Parameterized tests:OCaml/Menhir:OCaml/Menhir:289_LexerKeywords
  • Parameterized tests:OCaml/Menhir:OCaml/Menhir:202_comments
  • Parameterized tests:Java:Java:479_LabelsCaseSensitive

Java does not suffer case-sensitive labels as each label becomes a class in its own file.
Thus, we check this and throw an error.
Consequently, test 479_LabelsCaseSensitive is broken for the java backends.
@andreasabel andreasabel merged commit bfb34ee into master Apr 28, 2024
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AST Concerning the generated abstract syntax C
Projects
None yet
Development

Successfully merging this pull request may close these issues.

labels with same letters but different cases break the compilation on the c backend
1 participant