1.syntax: the spelling and grammatical structure of a computer language
2. semantics: the meanings of the words and phrases
3. Lexical analysis, or tokenization is the process of converting a sequence of characters into a sequence of tokens (strings).
4. BNF: Backus–Naur form
In the 1950s, Noam Chomsky realized that rules for building syntactically correct sentences can be written as an equational definition. Chomsky called the definition a grammar. John Backus and Peter Naur independently discovered the same concept, and for this reason, a grammar is sometimes called BNF (Backus-Naur form) notation.
A grammar is a set of equations (rules), where each equation defines a set of phrases (strings of words).