Definition:Formal Grammar

Definition
Let $$\mathcal{F}$$ be a formal language whose alphabet is $$\mathcal{A}$$.

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

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

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

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.