Greek letters are used to denote strings. Roman letters are used to denote symbols. The empty string, denoted as e , is a string of length 0. Any set of strings over some fixed alphabet. Terminal symbols are the basic symbols from which strings are formed.
Nonterminal symbols are syntactic variables that denotes sets of strings.
They impose a hierarchical structure on the language that is useful for syntax analysis and translation. The set of strings it generates constitutes the language defined by the grammar. A terminal sentential form is called a sentence . The function of lexical analysis is to extract the tokens of the language from the program source code and return the tokens to the parser. The basic issue of writing a scanner program is to recognize the string patterns that match the specifications of the grammar of the language.