For example, the notation that mathematicians use is a formal language that is particularly good at denoting relationships among numbers and symbols. Chemists use a formal language to represent the chemical structure of molecules. As I mentioned before, formal languages tend to have strict rules about syntax. Also, H 2 O is a syntactically correct chemical name, but 2 Zz is not. Syntax rules come in two flavors, pertaining to tokens and structure.
Tokens are the basic elements of the language, like words and numbers and chemical elements.
Similarly, molecular formulas have to have subscripts after the element name, not before. This process is called parsing . Once you have parsed a sentence, you can figure out what it means, that is, the semantics of the sentence. Assuming that you know what a shoe is, and what it means to fall, you will understand the general implication of this sentence. Formal languages are designed to be nearly or completely unambiguous, which means that any statement has exactly one meaning, regardless of context.