
Appendix C
Java Syntax
C.1 Introduction
This appendix describes the lexical and syntactic grammars
1
for the Java programming
language; the former specifies how individual tokens in the language are composed, and the
latter specifies how language constructs are formed. The grammars are based on the second
edition of the Java Language Specification.
C.2 Syntax
We employ the following notation to describe the lexical and syntactic grammars, similar
to what we used in Appendix B to specify j-- syntax.
• // indicates comments;
• Non-terminals are written in the form of Java (mixed-case) identifiers;
• Terminals are written in bold;
• Token representations are enclosed ...