Reputation: 23
Is there a method to propagate a comment in ANTLR to the code generated? e.g. if I have the Subversion revision number keyword ($Rev$) in a comment within the *.g4 file, is there a way for this to be within the generated code, so that I know that the parser was generated with that revisions version of the language?
Cheers, Adam
Upvotes: 1
Views: 137
Reputation: 5962
At this time, we are not copying the comments from the grammar into the generated code, although we should. Added https://github.com/antlr/antlr4/issues/375
Upvotes: 1