adam
adam

Reputation: 23

ANTLR Comment Propagation

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

Answers (1)

Terence Parr
Terence Parr

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

Related Questions