The ANTLR generated code has lots of nice identifier comments in it with 
the file, line number and grammar file contents that generated the code. 
Are there anything like preprocessor macros I can use to get direct access 
to that info?

I'm using the C# target and what I'm really after is the ability to add a 
custom code attribute to my generated classes to instruct code analysis 
tools that this is generated code.  It It should be easy to just embed 
that as hard-coded output in the @parser::header { } stuff like so:

        [GeneratedCodeAttribute("ANTLR","3.2")]

but I'd really like to have the generator drop the version number in for 
that string the way it does in the automatically generated comments, like 

// $ANTLR 3.2 Sep 23, 2009 12:02:23 

I spent 20 minutes googling and came up dry - any suggestions?


Tony Gray
Schneider Electric


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to