 Lexical grammar

In computer science, a lexical grammar is a formal grammar defining the syntax of tokens.The program is written using characters that are defined by the lexical structure of the language used.