BNFC / bnfc

BNF Converter
http://bnfc.digitalgrammars.com/
587 stars 165 forks source link

Java backend generates invalid package name #212

Closed andreasabel closed 4 years ago

andreasabel commented 7 years ago

If my input is my-grammar.cf, bnfc will create java code with package name my-grammar which is not legal.

EncodePanda commented 6 years ago

what would be the right name for the package? mygrammar or my_grammar? or just forbid the generation of the java code at all?

andreasabel commented 4 years ago

Following https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html it seems that snake_case is the convention.