Phrase Structure Grammar
A formal way to describe sentences as nested constituents — the rewrite rules and tree structures behind generative grammar.

Phrase structure grammar is a formal account of syntax in which sentences are built from nested constituents by rewrite rules. The core idea is that words group into phrases, phrases into larger phrases, and phrases into sentences, and that this grouping — not just linear order — is what gives a sentence its structure. A sentence such as "The cat saw the dog" is analyzed as a noun phrase followed by a verb phrase, with the verb phrase itself containing a verb and another noun phrase:
S
/ \
NP VP
/ \ / \
D N V NP
| | | / \
the cat saw D N
| |
the dog
This structure is generated by phrase structure rules: S → NP VP, NP → D N, VP → V NP, with lexical rules D → the, N → cat, and so on. The rules are recursive — a noun phrase can contain a prepositional phrase, which can contain another noun phrase, allowing sentences of unbounded length — which is exactly what a finite grammar needs to generate the infinite set of grammatical sentences. The resulting formalism is equivalent to context-free grammars, the same machinery used for programming languages and for the middle level of the Chomsky hierarchy of formal languages.
Linguists justify constituents with diagnostic tests. A phrase can be moved as a unit ("The dog, the cat saw"), replaced by a pro-form ("The cat saw it"), coordinated with another phrase of the same type ("The cat saw the dog and the bird"), and uttered alone as an answer to a question ("What did the cat see?" — "The dog"). These tests reveal structure that linear order hides, and they expose structural ambiguity: "I saw the man with the telescope" has two readings because the prepositional phrase can attach to the verb phrase or to the noun phrase, producing two different trees.
Modern syntactic theory developed from this foundation. X-bar theory generalized the rules into a schema in which every phrase has an intermediate projection (N', V', P'), with a head, a complement, a specifier, and adjuncts, and it restricted how phrases can combine — explaining why word order patterns differ across languages in systematic ways. The generative tradition initiated by Noam Chomsky in the 1950s uses phrase structure as the base onto which transformations or movement operations apply, as in Government and Binding theory and the Minimalist Program.
Phrase structure grammar is not the only way to model syntax. Dependency grammar, associated with Lucien Tesnière, analyzes sentences as networks of word-to-word relations (the verb as root, with arguments and modifiers attached directly) without intermediate phrases. The two traditions disagree about how much structure to posit, but phrase structure's tree representation remains the standard in both linguistics and computer science, where parsers such as CYK and Earley's algorithm use exactly these grammars.