Small discrepancies in JLS 14+

mazas.marc at gmail.com mazas.marc at gmail.com
Tue Jan 9 16:05:19 UTC 2024


Hi all

 

This if of any help.

 

While writing a parser of the JLS (in fact a translator from the JLS grammar
to a corresponding JavaCC grammar), I found some discrepancies.

 

The most interesting one is in JLS 14+ (e.g. for JLS 21:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-19.html):

The (last) production ConstantExpression is no more called in other
productions; formerly it was called in SwitchLabel, which now calls
CaseConstant {, CaseConstant}.

The corresponding chapters (e.g.
https://docs.oracle.com/javase/specs/jls/se14/html/jls-15.html#jls-15.29)
still uses the term "Constant Expressions"; shouldn't it use "Case
Constants" ?

 

Another one was PackageName in JLS 1.8, defined but not called, but now it
is called.

 

The Type production is also defined but not called (one can understand
that).

 

And of course the CompilationUnit is defined and not called.

 

Regards

Marc Mazas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jls-jvms-spec-comments/attachments/20240109/a047fbb1/attachment.htm>


More information about the jls-jvms-spec-comments mailing list