silver icon indicating copy to clipboard operation
silver copied to clipboard

Grammar names which are Java keywords

Open RandomActsOfGrammar opened this issue 4 years ago • 1 comments

If a grammar is named a Java keyword (e.g. interface), Silver will accept the grammar and translate it into Java, but Java compilation will fail. This is similar to #316, and can probably be fixed similarly by compiling grammar names to start with grammar_.

RandomActsOfGrammar avatar Feb 07 '21 19:02 RandomActsOfGrammar

I would prefer that we only do this for names that are actually java keywords.

We would need to append something to the offending component of the java package name, not to the entire package. This would also require renaming the directories in which code is generated.

krame505 avatar Feb 07 '21 19:02 krame505