CHAPTER 2: Grammars Previous
Previous
Java Language
Java Language
Index
Index
Next
Next

2.3 The Syntactic Grammar

The syntactic grammar for Java is given in Chapters 4, 6-10, 14, and 15. This grammar has Java tokens defined by the lexical grammar as its terminal symbols. It defines a set of productions, starting from the goal symbol CompilationUnit (S7.3), that describe how sequences of tokens can form syntactically correct Java programs.

A LALR(1) version of the syntactic grammar is presented in Chapter 19. The grammar in the body of this specification is very similar to the LALR(1) grammar but more readable.

© 1996 Sun Microsystems, Inc. All rights reserved.