---
spec: JLS
title: "The Java Language Specification"
edition: "Java SE 9 Edition"
java_version: 9
chapter: "Chapter 2. Grammars"
section: "2.3"
heading: "2.3. The Syntactic Grammar"
parent: "Chapter 2. Grammars"
source: https://docs.oracle.com/javase/specs/jls/se9/html/jls-2.html#jls-2.3
id: "2.3"
url: https://jvm.obfuscated.software/jls/se9/2.3.html
raw: https://jvm.obfuscated.software/jls/se9/2.3.md
---

# 2.3. The Syntactic Grammar

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

For convenience, the syntactic grammar is presented all together in Chapter 19.
