BNFC / bnfc

BNF Converter
http://bnfc.digitalgrammars.com/
578 stars 163 forks source link

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

Closed andreasabel closed 2 months ago

andreasabel commented 2 months ago

Fix https://github.com/BNFC/bnfc/issues/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 commented 2 months ago

@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 commented 2 months ago

This adds java/479_LabelsCaseSensitive to the broken tests: