The set of rules that defines the combination of symbols that are considered to be…