Generalities About Formal Grammars • 2
•
https://inquiryintoinquiry.com/2025/07/01/generalities-about-formal-grammars-2/
Characterizations —
Recall that a formal grammar ‡G‡ is defined by a 4‑tuple ‡G‡ = (“S”, ‡Q‡, ‡A‡, ‡K‡)
where “S” is the initial, special, start, or sentence symbol, ‡Q‡ is a finite set
of intermediate symbols, ‡A‡ is a finite set of terminal symbols, also known as the
alphabet of ‡G‡, and ‡K‡ is a finite set of characterizations, variously described as
covering rules, formations, productions, rewrite rules, subsumptions, transformations,
or typing rules.
To describe the variety of elements in ‡K‡ it helps to define a few additional terms.
• Augmented Alphabet
The symbols in {“S”} ∪ ‡Q‡ ∪ ‡A‡ form the augmented alphabet of ‡G‡.
• Non‑Terminal Symbols
The symbols in {“S”} ∪ ‡Q‡ are the non‑terminal symbols of ‡G‡.
• Non‑Initial Symbols
The symbols in ‡Q‡ ∪ ‡A‡ are the non‑initial symbols of ‡G‡.
• Augmented Strings
The strings in ({“S”} ∪ ‡Q‡ ∪ ‡A‡)* are the augmented strings for ‡G‡.
• Sentential Forms
The strings in {“S”} ∪ (‡Q‡ ∪ ‡A‡)* are the sentential forms for ‡G‡.
Each member of ‡K‡ is an ordered pair of strings (S₁, S₂) taking the following form.
• S₁ = Q₁ ∙ q ∙ Q₂
• S₂ = Q₁ ∙ W ∙ Q₂
S₁ and S₂ are augmented strings for ‡G‡, in particular, sentential forms
with S₁ being a non‑empty string and S₂ being a possibly empty string.
The element q is a non‑terminal symbol, in other words, q ∈ {“S”} ∪ ‡Q‡.
The elements Q₁, Q₂, and W are possibly empty strings of non‑initial symbols,
that is to say, Q₁, Q₂, W ∈ (‡Q‡ ∪ ‡A‡)*.
In practice the couplets belonging to ‡K‡ are used to derive, generate,
or produce sentences of the corresponding language ‡L‡ = ‡L‡(‡G‡).
The language ‡L‡ is then said to be governed, licensed, or regulated
by the grammar ‡G‡, a circumstance expressed in the form ‡L‡ = ⟨‡G‡⟩.
Because it helps to focus our attention on the the more active dynamic
aspects of using grammars to generate languages it is usual to write
abstract characterizations like (S₁, S₂) and specific characterizations
like (Q₁∙q∙Q₂, Q₁∙W∙Q₂) in the following forms.
• S₁ :> S₂
• Q₁∙q∙Q₂ :> Q₁∙W∙Q₂
The characterization S₁ :> S₂ amounts to a grammatical license to transform
a string of the form Q₁∙q∙Q₂ into a string of the form Q₁∙W∙Q₂, in effect,
replacing the non‑terminal symbol q with the non‑initial string W in any
selected, preserved, and closely adjoining context of the form Q₁∙__∙Q₂.
In that application the notation S₁ :> S₂ can be read to say that S₁
produces S₂ or that S₁ transforms into S₂.
cc:
https://www.academia.edu/community/LmawZP
cc:
https://www.researchgate.net/post/Generalities_About_Formal_Grammars