Chapter 3: Lexical Analysis

Examples

 

. My email address ska@iitk.ac.in

. S = letter U {@, . }

. Letter a| b| .| z| A| B| .| Z

. Name letter +

. Address name '@' name '.' name '.' name

Now we look at the regular definitions for writing an email address ska@iitk.ac.in:

Set of alphabets being S = letter U {@, . } ):

Letter a| b| .| z| A| B| .| Z i.e., any lower case or upper case alphabet

Name letter + i.e., a string of one or more letters

Address name '@' name '.' name '.' name