Java.g [version 1.0.6]: are now non-Javadoc comments suppressed?

Yang Jiang yang.jiang.z at gmail.com
Sat Aug 28 00:38:09 PDT 2010


What you got is right, standard comment, line comment ( "// coment" ) 
and white spaces are skipped.

Just search for "skip" in java.g and you'll see.

yang

On 08/28/2010 03:18 PM, Roberto Mannai wrote:
> Hi all
>
> [I sent the following message to the antlr-interest mailing list,
> sorry for the cross posting]
>
> Maybe I'm overlooking something, but it seems to me that the Java.g
> v.1.0.6 grammar (
> http://openjdk.java.net/projects/compiler-grammar/antlrworks/Java.g )
> does not emit the standard Java comments  ( /* COMMENT */ ).
>
> When I process the following file, with antlr 3.2:
>
> /** Is this comment returned?*/
> public class TestComment {
>         /* Is this comment returned?*/
> }
>
> I get:
>       /** Is this comment returned?*/publicclassTestComment{}
>
> One "previous version" (*) returned:
>       /** Is this comment returned?*/
>       public class TestComment {
>               /* Is this comment returned?*/
>       }
>
>
> Is this behaviour really changed or am I missing/forgetting anything?
>
> Thanks,
>
> Roberto
>
> (*) The previous version was based on Java.g v.1.0.5 (it contains also
> some template calls, anyway):
> http://codesounding.svn.sourceforge.net/viewvc/codesounding/CodeSounding/trunk/src/codesounding/antlr/JavaRewrite.g?view=markup
>    



More information about the compiler-grammar-dev mailing list