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 (ยง7.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.


Send feedback to MSDN.Look here for MSDN Online resources.