[JSR308] Others possible syntaxes for type annotations

Neal Gafter gafter at google.com
Fri May 18 17:02:59 EDT 2007

On May 18, 2007 11:42 AM, Michael Ernst <mernst at csail.mit.edu> wrote:
> Neal-
> > I have in mind a uniform and unambiguous annotation syntax for types
> > (essentially a single production), statements (ditto), and declarations
> You have been saying this all year, but you haven't yet provided a
> description of your proposed syntax.

Sure.  In summary, the proposed grammar changes are the following additions:


*Type Annotation*


*Annotation Statement*


*Annotation VariableDeclaratorRest*


*MethodOrFieldRest Annotation*

When an annotation appears at the beginning of a declaration (using the
existing syntax) and in one of these new contexts in the same declaration,
it is an error. In that case the programmer must migrate the annotation to
the new syntax. This prevents annotations from appearing "out of order".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.csail.mit.edu/pipermail/jsr308/attachments/20070518/f4d99a19/attachment.htm

More information about the JSR308 mailing list