[antlr-interest] Code Generation Concerns

Kevin Cherry kcherr1 at tigers.lsu.edu
Wed Mar 23 10:39:12 PDT 2011


Maybe this is ANTLR Works doing this, but every time code is generated, the
full file path to my grammar file is displayed in comments throughout the
entire file (i.e. // dir/dir/file.g put in like 50 different places all over
the class definition). I find this both a security and privacy issue if I am
making this code available to other people. Sure I can delete it, but every
time it is regenerated, it comes back. There is also a method created for
the class that returns a string literal with the file path in it. Is there
anyway of telling ANTLR not to do this?
Also, is there any way to change the generated class's visibility from
public to something else?


More information about the antlr-interest mailing list