Definition:Formal Grammar

Definition
Let $$\mathcal L$$ be a formal language whose alphabet is $$\mathcal A$$.

The formal grammar (or syntax) of $$\mathcal L$$ is the set of rules of formation which determine whether words in $$\mathcal A$$ belong to $$\mathcal L$$ or not.

Rules of Formation
The rules of formation of $$\mathcal L$$ are the rules which define how to construct words in $\mathcal L$ which are well-formed.

That is, the rules of formation tell you how to build strings consisting of symbols from the alphabet $$\mathcal A$$ which are part of the formal language $$\mathcal L$$.

The rules of formation of a formal language constitute its syntax.

Top-Down
A top-down grammar is one whose rules of formation allow the user to replace metasymbols with strings containing either other metasymbols or primitive symbols until only a well-formed word is left.

Bottom-Up
A bottom-up grammar is one whose rules of formation allow the user to build well-formed words from primitive symbols, and then progressively build more elaborate well-formed words.