[antlr-interest] what does /** do?
lgcraymer at yahoo.com
Mon Feb 25 17:04:02 PST 2008
No, it is not the norm--most systems just ignore javadoc comments. Ter, however, decided to transmit the javadoc comments to the generated code, so ANTLR recognizes the javadoc comments in selected places that conform to stylistic conventions. Comment preservation in language translators is somewhat of an art; the approach taken by ANTLR has the advantage of simplicity and utility, with the slight "drawback" that a javadoc placement style is enforced.
----- Original Message ----
> From: Benjamin Shropshire <shro8822 at vandals.uidaho.edu>
> To: Loring Craymer <lgcraymer at yahoo.com>
> Cc: Antlr Interest <antlr-interest at antlr.org>
> Sent: Monday, February 25, 2008 4:00:17 PM
> Subject: Re: [antlr-interest] what does /** do?
> Loring Craymer wrote:
> > That's actually the expected behavior: ANTLR accepts javadoc comments just
> before grammar or rule declarations and nowhere else. Regular comments (/* ..
> */ or // ) are accepted anywhere--they are filtered out before they can be seen
> by the parser.
> > --Loring
> Is that normal for Javadoc like systems? The only other one I've used*
> won't throw an error no mater where you put a /** */ or what you put in
> it. It just does it's best and keeps on going if it can't make out what
> you want.
Never miss a thing. Make Yahoo your home page.
More information about the antlr-interest