This chapter repeats the syntactic grammar given in Chapters 4, 6-10, 14, and 15, as well as key parts of the lexical grammar from Chapter 3, using the notation from 2.4.
Productions from 3 (Lexical Structure)
Productions from 4 (Types, Values, and Variables)
byte
short
int
long
char
float
double
Productions from 6 (Names)
Productions from 7 (Packages and Modules)
requires
{RequiresModifier}
ModuleName ;
exports
PackageName [to
ModuleName {,
ModuleName}] ;
opens
PackageName [to
ModuleName {,
ModuleName}] ;
uses
TypeName ;
provides
TypeName with
TypeName {,
TypeName} ;
transitive
static
Productions from 8 (Classes)
extends
ClassTypeimplements
InterfaceTypeListthrows
ExceptionTypeListstatic
Blockthis
(
[ArgumentList] )
;
super
(
[ArgumentList] )
;
.
[TypeArguments] super
(
[ArgumentList] )
;
.
[TypeArguments] super
(
[ArgumentList] )
;
Productions from 9 (Interfaces)
interface
TypeIdentifier [TypeParameters]
[InterfaceExtends]
[InterfacePermits]
InterfaceBodyextends
InterfaceTypeListdefault
ElementValue@
TypeNameProductions from 14 (Blocks, Statements, and Patterns)
;
finally
BlockProductions from 15 (Expressions)
(
[ArgumentList] )
.
[TypeArguments] Identifier (
[ArgumentList] )
.
[TypeArguments] Identifier (
[ArgumentList] )
.
[TypeArguments] Identifier (
[ArgumentList] )
super
.
[TypeArguments] Identifier (
[ArgumentList] )
.
super
.
[TypeArguments] Identifier (
[ArgumentList] )
::
[TypeArguments] Identifier ::
[TypeArguments] Identifier ::
[TypeArguments] Identifier super
::
[TypeArguments] Identifier .
super
::
[TypeArguments] Identifier ::
[TypeArguments] new
::
new
=
*=
/=
%=
+=
-=
<<=
>>=
>>>=
&=
^=
|=