Multiple choice

Match the following.

 
i. Token a. Character i, f, letter followed by latter and digits etc
ii. Pattern b. if, id, comparison
iii. Lexeme c. if, pi, < =

  1. i – b, ii – a, iii – c

  2. i – b, ii – c, iii – a

  3. i – c, ii – a, iii – b

  4. i – c, ii – b, iii - a

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The token name is on abstract symbol representing a kind of lexical unit i.e. a particular keyword or a sequence of input characters denoting on identifier. A pattern is a description of the form that the lexeme of a token may take. A lexeme is a sequence of characters that matches pattern of a token.