I am reading The Java Language Specification 8.
I am trying to understand Chapter 2. Grammars.
Here's what I have already learned:
Semantics:
Semantics is the study of meaning.Meaning:
Meaning, in semantics, is defined as being Extension: The thing in the world that the word/phrase refers to, plus Intention: The concepts/mental images that the word/phrase evokes.Syntax:
Syntax is all about the structure of sentences, and what determines which words go where.Production:
A production or production rule in computer science is a rewrite rule specifying a symbol substitution that can be recursively performed to generate new symbol sequences.Alphabet:
A non-empty set is called alphabet when its intended use in string operations shall be indicated.Lexeme:
A lexeme is a string of characters which forms a syntactic unit.Syntactic unit:
Sentence is the "highest" (i.e., largest) syntactic unit,
the lowest (i.e., smallest) syntactic units are words,
the intermediate syntactic units are the phrases.Token:
A token is a structure representing a lexeme that explicitly indicates its categorization for the purpose of parsing.Grammar:
A grammar (when the context is not given, often called a formal grammar for clarity) is a set of production rules for strings in a formal language. The rules describe how to form strings from the language's alphabet that are valid according to the language's syntax. A formal grammar is a set of rules for rewriting strings, along with a "start symbol" from which rewriting starts.- Lexical grammar:
A lexical grammar is a formal grammar defining the syntax of tokens.
I could not find out what syntactic grammar is.